Associate
September 22, 2014
Question
STM32F0 (72) SPI 1 Wire Bidirectional with DMA BUG?
- September 22, 2014
- 3 replies
- 1093 views
Posted on September 22, 2014 at 08:06
Aim: Read 4 byte from MAX31855 (SPI readonly compatible) using SPI2 1wire bidirectional (using DMA)
Code: (attached) Note: SPI_CR1_BIDIMODE bit set SO->MOSI DMA Channel4->RX Channel5->TX (though garbage -- mandatory?) Expected: everything goes well and no error should occur in read. Actual: SPI_SR_OVR bit is set and SPI_SR_BSY loop is causing infinite loop(at ''while (SPI2_SR & SPI_SR_BSY);'' in DMA ISR) Another Try: clear the SPI_CR1_BIDIMODE bit and connect SO->MISO, everything goes well. (ie read from the slave using 2 wire unidirectional works) (STM32F072RBT6) #stm32 #halfduplex #spi #dma