2021-11-15 04:35 AM
I have done the implementation of 3 wire SPI using DMA and when I do SPI transfer using
HAL_SPI_Transmit_DMA(&SPIx_handle, (uint8_t *)TxBuffer, 8u); the HAL_SPI_GetState(&SPIx_handle) is stuck at HAL_SPI_STATE_BUSY_TX.
Not changing the state.
My configuration of SPI and DMA is similar to this query : STM32F405 SPI Transmit using DMA not working
Thanks in advance
Edit: First time posting query here, if anything needed additionally please comment
Edit 2: Earlier mentioned HAL_SPI_STATE_BUSY, updated to HAL_SPI_STATE_BUSY_TX
Solved! Go to Solution.
2021-11-18 06:07 AM
> Issue is when the NSS is high, Clock also present.
The "NSS" signal on the STM32F4 is not a CS signal. It pulses at the end of each byte in TI mode, which is presumably what you have selected. You'll need to use a different method.
2021-11-18 06:21 AM
> TI mode, which is presumably what you have selected
Nice catch, TDK!
Indeed, CR2 is 0x32 i.e. FRF is set.
In that case, also CR1.SSM is moot.
But this also implies that given pin is set as AF, rather than Out, in GPIO - is this the case?
JW
2021-11-18 07:02 AM
Hi TDK,
Thanks for the response
Closing this issues "STM32F4 SPI with DMA is not working, Transmit only used. stuck at HAL_SPI_STATE_BUSY_TX", since SPI with DMA in transmit mode is working fine. But second part is due to internal project issue, I will figure it out later.
I appreciate the time and effort you put, Thanks
2021-11-18 07:02 AM
Hi JW,
Thanks for the response
Closing this issues "STM32F4 SPI with DMA is not working, Transmit only used. stuck at HAL_SPI_STATE_BUSY_TX", since SPI with DMA in transmit mode is working fine. But second part is due to internal project issue, I will figure it out later.
I appreciate the time and effort you put, Thanks
2022-11-25 01:34 PM
Check for peripheral conflicts, is anything competing for that DMA channel?