c28 serial communication model descriptions

Mohammad Tauquir Iqbal on 29 Jul 2019
Latest activity Reply by Mohammad Tauquir Iqbal on 8 Oct 2019

can you tell how c2000_host_read_12M.slx is working and subsystems of it. its not discussed in the video morever how you ran the model f28379 in ccs and host in normal.? can you explain like step by step i tried same but got error n error occurred while running the simulation and the simulation was terminated Caused by: Error evaluating registered method 'Outputs' of MATLAB S-Function 'sserialsb' in 'online_tun/Serial Send/Serial Send'. FWRITE cannot be called. The FlowControl property is set to 'hardware' and the Clear To Send (CTS) pin is low. This could indicate that the serial device may not be turned on, may not be connected, or does not use hardware handshaking.

Antonin
Antonin on 1 Aug 2019

Hi Mohammad,

I guess you are talking about the video attached our DC/DC Buck Converter Example. The DCDC_Buck.slx will run on the target, so you need to generate code for it. A simple press of the "Deploy to Hardware" button (or Ctrl+B) generates code, compiles it into an executable, loads it on the TI LaunchPad board and runs it. The c2000_hot_read_12M.slx should be run on the host by pressing the play button. It uses host side serial blocks that are meant to be run on the host computer.

Now, Simulink running on the host would never be able to catch one piece of data sent at 200kHz, turnaround in less than 5µs and get the next piece of data. So, we wait until we have 12000 data points before the host reads the buffer. This leaves 60ms for Simulink to process the data and be ready for the next buffer.

I explained the technique on this post: What is the idea behind data processing for SCI communication in DC/DC Buck Converter Example?

More info on real-time data logging here: How to increase acquisition frequency in real time?

For the particular error that you are seeing, it sounds like your board doesn't support hardware flow control. We've seen this on the F280049C LaunchPad using the xds110 usb from TI. Just open the "Serial Configuration" block on the c2000_hot_read_12M.slx and change the "Flow Control" to "None". This should remove the error. Make sure that the host baudrate is compatible with your target baudrate. You shouldn't need flow control since the target and the host are synchronized.

On the F2837x Launchpad, like explained in the video, the target can achieve 12.5MBps but the host will only work if configured to 12MBps, the 2 baudrates are close enough for the communication to be established. More info on compatible baudrates: https://www.mathworks.com/matlabcentral/answers/353939-can-simulink-use-ti-c2000-launchxl-f28027f-or-f2808-to-monitor-a-analog-signal-200khz

The DC/DC Buck Converter Example is now a shipping example. Here is a link to the documentation page: https://www.mathworks.com/help/ Modeling a Voltage Controller for the DC/DC Buck Converter supportpkg/texasinstrumentsc2000/ug/dc-dc-buck-converter.html

I hope it helps, Thanks,

Antonin.

Mohammad Tauquir Iqbal
Mohammad Tauquir Iqbal on 8 Oct 2019

by changing flow control to none, I cannot see any signal at the scope.

aveline wmorrh
aveline wmorrh on 6 Aug 2019

hello