cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect order of SPI datas?

SNEM.1
Associate II

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!

3 REPLIES 3
gbm
Lead II

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

SNEM.1
Associate II

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

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