MATLAB Answers

MATLAB to TI C2000 F28379D data exchange

12 views (last 30 days)
I would like to send and receive data between MATLAB and a TI C2000 F28379D controller. More specifically the F28379D is to control and monitor a circuit but will also require comparisons with previously aquired calibration data to help in the control of the output signal, hence I am looking for near real-time data flow from the controller to MATLAB and for MATLAB to be able to change a variable/register in the controller if needed. Is it possible to accomplish this via an I2C command or will I need to find another means to accomplish this? Eitherway I am stuggling with setting up the communication path and could some guidance on how to accomplish this.

Accepted Answer

Sumith Sekharan
Sumith Sekharan on 1 Oct 2020
To communicate with Simulink/MATLAB from F28379D Launchpad, you can use the USB serial interface available on the hardware. For logging and tuning we can use 2 methods:
  1. External mode: https://www.mathworks.com/help/releases/R2020b/supportpkg/texasinstrumentsc2000/ug/parameter-tuning-and-signal-logging-with-serial-external-mode.html
  2. If your algorithm is running at fater rate like 50 usec, we have a custom serial protocol to log and tune signals. This method is explained in this video: https://www.mathworks.com/matlabcentral/fileexchange/61420-dc-dc-buck-converter-example.
Hope this helps, let us know.
Thanks,
Sumith
  1 Comment
Johnathan Williams
Johnathan Williams on 1 Oct 2020
Thank you for the reply- I have been able to establish the external mode communications with Simulink, and originally used 'to' and 'from workspace' functions for the data exchage, but this only uploaded values at the begining of the simulation and then logged only some of the final output values at the end. I am looking to continuously read an input value of the F28379 in Matlab, compare it to a calibration matrix that I will load in to a Matlab program, and then change a pulsewidth value of an output of the F28379 program, if needed.
Is there a way to have more continuous updates/data exchange between the F28379 microcontroller and a program written in Matlab?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!