AnsweredAssumed Answered

STM32F0 (72) SPI 1 Wire Bidirectional with DMA BUG?

Question asked by dhaka.kuldeep on Sep 22, 2014
Latest reply on Oct 9, 2014 by gonzalez.laurent
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)

Attachments

Outcomes