2025-07-07 11:12 PM
Hello,
My project is working with stm3h743 HAL version 1.0.0 (the first one ever created).
I am trying to update to the latest HAL version which auto generate by Cubeide 1.18.1 (Fw package 1.12.2).
I am using spi1/2/4/5 full duplex mode but currently I have problem with spi 5 through _IT mode (no DMA).
The problem occurs only when I use HAL_SPI_Receive_IT for reading.
In the old HAL I use this->handle.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2 and i am reading successfully through spi5.
However, if I take the new hal and don't change anything else i get overrun error. (The same slave Hw of course).
One solution (but not a good one) I found is to use SPI_BAUDRATEPRESCALER_128 but it hurts performance and seem not to be stable.
What could be the problem?
One more thing, I notice that in the old HAL if we are the master and use 2 lines, we call HAL_SPI_transmitReceive_IT (inside HAL_SPI_Receive_IT).
In the new HAL its different- we do HAL_SPI_Receive_IT before handle IRQ and don't call HAL_SPI_transmitReceive_IT.
I don't know if its effect but I tried to change each call of HAL_SPI_Receive_IT to HAL_SPI_transmitReceive_IT but it does not help.
Please write your advice,
Thanks