Why does the SPI communication between a Raspberry Pi Pico and TI F28379D LaunchPad not work consistently?

8 views (last 30 days)
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.
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.
The subsystem function() is shown below, as well as the settings of the SPI Receive block.
In Hardware Settings, the Solver settings and Hardware Implementation settings for the SPI_A group are shown below:
The received data over time is shown in the scope below:
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!

Answers (0)

Categories

Find more on Raspberry Pi Hardware in Help Center and File Exchange

Products


Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!