Skip to main content
SNEM.1
Associate II
October 3, 2022
Question

Incorrect order of SPI datas?

  • October 3, 2022
  • 3 replies
  • 1004 views

I use my STM32F469I-DISCO board as slave to communicate with Arduino Mega. The communication is OK. I got the correct values in my array (uint8_t buff_read[10]). But the order is not correct! It shifted with some index but not a fixed number. If i run the code on the board, for example the indexes shifted with 2. If I compile the code again and download on the board the datas shifted for example with 7... What is the problem? Should I maybe flush the Rx_DR before the first read? How can I do it? (I use interrupt mode).

Thanks a lot!

This topic has been closed for replies.

3 replies

gbm
Lead III
October 3, 2022

And what exactly kind of help you expect without showing your code?

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
SNEM.1
SNEM.1Author
Associate II
October 3, 2022

A theoretical answer. But I got the answer, I solved this issue. Just connect the master Arduino after the code has downloaded.

S.Ma
Principal
October 4, 2022

Seems that NSS purpose has just been rediscovered....