4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-18 10:43:30 +08:00

Fix bug cause HAL SPI timeout

The bug affects in SPI mode 1 (probably and mode 2)
When changing SPI device, HAL returns timeout error for the first time trying to read/write.
This commit is contained in:
Jianjia Ma 2020-04-13 10:50:55 +01:00 committed by GitHub
parent 5c399d50a7
commit 24bc2560ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -257,8 +257,6 @@ static rt_err_t stm32_spi_init(struct stm32_spi *spi_drv, struct rt_spi_configur
HAL_NVIC_EnableIRQ(spi_drv->config->dma_tx->dma_irq);
}
__HAL_SPI_ENABLE(spi_handle);
LOG_D("%s init done", spi_drv->config->bus_name);
return RT_EOK;
}