AnsweredAssumed Answered

SPI Slave RX data shifted

Question asked by bujak.daniel on Nov 21, 2017
Latest reply on Nov 21, 2017 by KIC8462852 EPIC204278916

I'm having an issue with the LL SPI driver on the STM32L4 configured as SPI slave. My Tx buffer contains {01, 02, 03, 04, 05, 06, 07... }. When I read 7 bytes repeatedly from the slave using the Aardvark SPI master I get the following responses:

 

01 02 03 04 05 06 07

08 09 0A 01 02 03 04

05 06 07 01 02 03 04

05 06 07 01 02 03 04

05 06 07 01 02 03 04

...

 

Resetting the master doesn't change anything. Resetting the STM32 slave will start the pattern over. It seems like the STM32 is trying to sent 10 bytes instead of the 7 the master is reading and the last 3 bytes are persisting in the TX buffer. Is this possible? How do I fix this?

Outcomes