Does anyone had any success in using spi 3 wires, managing SPI_CR1_BIDIMODE and SPI_CR1_BIDIOE ?
What I have tried is to have 2 spiConfig structure, one for reading, one for writing, both with SPI_CR1_BIDIMODE, the writing one having SPI_CR1_BIDIOE in addition.
When I want to send, I do spiStart with the write configuration, then spiSend, but it hangs : spi does not signal completion to the dma which get stuck.
If I remove SPI_CR1_BIDIMODE from configuration, that does not hangs (but obviously works in 4 wire mode)
I use chibios 21.11.trunk with lastest patches.
Alexandre -- trying to communicate with infineon TDA5150
edit1 : polled exchange does not work neither because loop get stuck in this loop, which is logic in 3 wire mode where write and read must be sequential.
Code: Select all
while ((spip->spi->SR & SPI_SR_RXNE) == 0U) {
/* Waiting frame transfer.*/
}