LAUNCHXL-F28379D: Simulanting SPI with 2 Slaves, using 'TI C2000 target library' for PLECS

조회 수: 8 (최근 30일)
Hi,
I was trying to simulate/configure SPI interface with 2 slaves... I used SPI Master & Slave components from the TI C2000 target available under the PLECS library.
For now I just want to send data from Master to 2 Slaves.
E.g. I would like to send 1,2,3,4,5,6,7,8 from the master and receive 1,3,5,7 at slave1 & 2,4,6,8 at slave2
But what I see on both slaves is the copies of the master.
i.e, Master is sending 1,2,3,4,5,6,7,8 ....Slave1 & Slave2 and receiving 1,2,3,4,5,6,7,8

답변 (1개)

Animesh
Animesh 2023년 5월 11일
Hi Pradeep,
I understand that you are trying to simulate a SPI between a master and 2 slaves using TI C2000 target.
The configuration seems to be a problem here. Please consider having a look at the following documentations and shipping examples for the right use of components according to your use-case:
  1. Use case scenarios for SPI (Master Transfer/Transmit/Receive) blocks when developing a Simulink Application for TI C2000: https://in.mathworks.com/matlabcentral/answers/770813-what-are-the-use-case-scenarios-for-spi-master-transfer-transmit-receive-blocks-when-developing-a
  2. Write data to and read data from SPI peripheral device: https://in.mathworks.com/help/ti-c2000/ref/c28xspicontrollertransfer.html
  3. To receive data through Serial Peripheral Interface (SPI) on target: https://in.mathworks.com/help/ti-c2000/ref/c28xspireceive.html?searchHighlight=SPI%20for%20c2000&s_tid=srchtitle_SPI%20for%20c2000_9
  4. To transmit data through Serial Peripheral Interface (SPI) on target: https://in.mathworks.com/help/ti-c2000/ref/c28xspitransmit.html?searchHighlight=SPI%20for%20c2000&s_tid=srchtitle_SPI%20for%20c2000_10
I hope this helps.

카테고리

Help CenterFile Exchange에서 Code Generation for ARM Cortex-M and ARM Cortex-A Processors에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by