Why does the SPI communication between a Raspberry Pi Pico and TI F28379D LaunchPad not work consistently?
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello all,
For my graduation assignment I am trying to use SPI communication to send 6 24-bit integers from a Raspberry Pi Pico to a TI F28379D LaunchPad. In my understanding, in this case the Pico is the master/controller, and the LaunchPad is the slave/peripheral. In order to verify the SPI communication first before expanding it to multiple integers, I tried to send a single 8-bit integer (value=150) at a rate of ~100Hz with a clock frequency of 2 MHz. I verified using a logic analyser that the Pico is indeed sending the integer correctly, see screenshot below.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1597876/image.png)
The boards are connected physically through the following cable connections:
Pico - LaunchPad
GND - GND
SPI0 TX - SPIA SIMO
SPI0 RX - SPIA SOMI
SPI0 SCK - SPIA CLK
SPI0 CSn - SPIA CS
My Simulink model is shown below, which is based on the example model c28x_spi_interrupt_test_ert. It uses a hardware interrupt which is triggered at a FIFO length of 1. It sends the received data to a display and scope for inspection.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1597881/image.png)
The subsystem function() is shown below, as well as the settings of the SPI Receive block.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1597886/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1597891/image.png)
In Hardware Settings, the Solver settings and Hardware Implementation settings for the SPI_A group are shown below:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1597896/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1597901/image.png)
The received data over time is shown in the scope below:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1597906/image.png)
As you can see, the received value is not constantly 150, but rather jumps between a couple of integer values. Can anyone help me with finding out which settings and/or timings could be the cause of this issue? Thanks in advance!
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Raspberry Pi Hardware in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!