SPI back to back writes
Hello,
setting up STM32L412 SPI for 16 bit Spi transfer and doing:
uint16_t *SPI_DR = (uint16_t*)&SPI1->DR;
*SPI_DR = 0;
// while (~SPI1->SR & SPI_SR_TXE) {NutSleep(0);}
*SPI_DR = 0;
results in only 16 bit shifted out. With the check for TXE enabled, 32-bits are shifted out as expected. FRXTH is set to 0: RXNE event is generated if the FIFO level is greater than or equal to 1/2 (16-bit)
The registers are CR1 = 0x34d, CR2 = 0xf00, SR = 0x2
I did not find any restrictions in back to back write in the datasheet. PCLK is 16 MHz. But it seems the second write is ignored. I don't see an errata regarding this issue too.
