Problem in bidirectional IPC comunication with C2000

24 views (last 30 days)
Dear All,
I'm trying to use IPC with TI C2000 Delfino F28379D Launch pad, following the example in documentation.
1) Starting form it (Ref IPC example), I can run
WORKING_00_c2837xd_ipc_cpu2_ORIGINAL on CPU 1 in Build mode
and
WORKING_00_c2837xd_ipc_cpu2_ORIGINAL on CPU2 in External mode
withou any problem receiving (scalar and vector) in the correct way on CPU2.
2) Then I "swapped" some blocks from the two model in order to have some data flowing from CPU2 to 1, so I kept
  • Channel 0 and 1 sending scalar data to CPU2
  • Channel 3 sending vector data to CPU2
while
  • Channel 2 sends vector from CPU2 to CPU1
  • Channel 4 sends scalar from CPU2 to CPU1
I test running (sending data from CPU1 to CPU2 and viceversa but looking results on CPU2)
NOTWORKING_00_c2837xd_ipc_cpu1_PartialSWAP on CPU 1 in Build mode
NOTWORKING_00_c2837xd_ipc_cpu2_PartialSWAP on CPU2 in External mode
and I get correct values on CPU2 (changing values even it seem to have some repetition pattern).
3) unfortunately If I run (sending data from CPU1 to CPU2 and viceversa but looking results on CPU1)
NOTWORKING_00_c2837xd_ipc_cpu2_PartialSWAP on CPU2 in Build mode
NOTWORKING_00_c2837xd_ipc_cpu1_PartialSWAP on CPU 1 in External mode
Scalar are receved on CPU1 correctly
BUT vector data receved on Channel 2 are strange non-sense number!
4) if I change vector sent on channel 2 (CPU2) to a scalar, I receive CORRECT data on CPU1.
I replicated the problem in similar model, I can't succed in having vector to and from different CPUs. Where I'm wrong?
Any Suggestion is welcome
Thansk,
Mario

Answers (3)

Michael Zauner
Michael Zauner on 27 Apr 2021
Hello,
I had a very similar problem to what you described with your IPC communication and vectors.
I am using Matlab 2021a, and when I upgraded the "Embedded Coder Support Package for Texas Instruments C2000 Processors" Toolbox to Version 21.1.1 the problem went away.
Don't forget to setup your toolbox after the upgrade and use the correct CCS version!
Best regards
  1 Comment
Mario Silvagni
Mario Silvagni on 27 Apr 2021
Thanks, everithing seems to works fine a part this IPC (bidirectinal only)
No update, brand new installation of 2021a followed by Support package

Sign in to comment.


Musfata Zabun
Musfata Zabun on 15 Nov 2021
Hi ,
I have a quesiton about IPC Transmit and IPC Recevie. So, After creating separate models for both IPC Transmit and IPC Receive in Simulink, how do I upload them to the TMS320F28379D Board at the same time?
  1 Comment
Michael Zauner
Michael Zauner on 15 Nov 2021
You upload them one after the other. First CPU2, then CPU1 code.
See this example here:
From the Example:
n order to run the example. Download the CPU2 model for TI F2838x (C28x) and then run CPU1 model for TI F2838x (C28x) in External mode.
CPU2 model for TI F2838x (C28x)
Open the CPU2 model, and click Build, Deploy & Start under Hardware tab or press Ctrl+B to build and download the executable file on CPU2.
CPU1 model for TI F2838x (C28x)
1. Open CPU1 model.
2. In the Configuration Parameters window, click Hardware Implementation and navigate to Target hardware resources > External mode and set the Serial port parameter to the COM port at Device Manager > Ports (COM &LTP) in Windows. For more information, see Parameter Tuning and Signal Logging with Serial Communication.
3. Open Hardware tab and click Monitor & Tune.
4. Observe the output data using Display blocks. The data received from ARM Cortex - M4 will be delayed value when compared with the data transmitted to CPU2.

Sign in to comment.


Musfata Zabun
Musfata Zabun on 15 Nov 2021
Thank you for your answer. Can you share your e-mail for my question about this?
  2 Comments
Michael Zauner
Michael Zauner on 15 Nov 2021
I am not an employee of Mathworks and don't offer support like that ;)
But you can try the official Mathworks support or create a new question for your specific problem
Musfata Zabun
Musfata Zabun on 15 Nov 2021
You are absolutely right. Also, there is one more thing I'm wondering about. According to the example you mentioned, is the CPU1 model only used for display? In my thesis work, the data coming from the sensor in the motor will be transmitted to CPU1. In CPU1 this data will be converted to RPM, evaluated and sent to CPU2. Then CPU2 will calculate the error according to this RPM (reference value will be in CPU2) and will provide the speed control of the motor by producing PMW thanks to PI control. Is it possible to implement like this? The topic of my thesis is "DC motor speed control using PI control".

Sign in to comment.

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!