2018-02-10 06:38 PM
Hi,
I'm trying a simple SPI communication link between RPi3 and STM32F7 (STM32F722ZE Nucleo Board).
The code is very simple, RPi3 code just transfers 40 bytes data and expects to see 0-39 as byte values in return after the transfer.
The code in STM32 is basically to setup SPI DMA transfers of 40 bytes with a preset tx buffer containing 0-39 as byte values.I see that the code runs for a while (some times upto 5 seconds), and later my RPi3 program detects a missing sequence.
Instead of seeing [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39]
I see [36, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38]
I also checked on an oscilloscope and verified that STM32 was infact sending wrong byte sequence.
I'm running SPI at 1MHz (but I see it go wrong at 100KHz also), and in between transfers I keep a 1ms delay.
Please let me know what could be wrong ?
Thanks,
Sharankumar
#missing-byte #stm32f7-dma #stm32f7-spi2018-03-28 07:06 AM
Hi Sharankumar,
I am working with SPI on a Nucleo F746 board. Can you please post your init code and loop? Without it it is hard to give some help.
Thanks,
Andre