Filter löschen
Filter löschen

Raspberry Pi 3 SPI - Blocks. How to start the SPI Communication?

1 Ansicht (letzte 30 Tage)
Daniel
Daniel am 29 Mai 2017
Hello, I can´t implement the Matlab Simulink SPI Block for Raspberry Pi 3. I wan´t to connect the Pi with an Arduino Mega. I can´t measure any Signal on the Ports. Is there an example?
Thank you. Best Regards, Daniel

Antworten (1)

Madhu Govindarajan
Madhu Govindarajan am 18 Okt. 2017
Here is an example of using SPI communication with Raspberry PI and simulink - https://www.mathworks.com/help/supportpkg/raspberrypi/examples/communicating-with-an-eeprom.html . Usually the trick with SPI and I2C sensors is to perform the initialization routine accurately, once you have that going based on your specific sensor's commands it should be smooth afterwards.
  2 Kommentare
Stefan Frutiger
Stefan Frutiger am 30 Jan. 2018
This example is really good. But i have another Problem with the SPI Interface. How can you change the Sample Time from the SPI Read Block? Because this is an essentially Parameter for an Input.
Madhu Govindarajan
Madhu Govindarajan am 30 Jan. 2018
It looks like this block is implemented from a MATLAB System object and I believe those do not allow you to specify the sample time. Others here might be able to throw more light on this - but I believe one cannot access parameters from p coded files and it might not even change if you change the SPI bus speed.
Sorry for not being able to help you further.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Raspberry Pi Hardware finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by