Simulink External Mode on Texas Instruments TMDSCNCD28379D (F28379D) not working
11 views (last 30 days)
I am trying to run TMDSCNCD28379D in an External Mode in MATLAB R2018a.
I can successfully run the code (Deploy to Hardware), but when I set Run to External Mode option
I get that well-kown error message:
Build process completed successfully
Error occurred while executing External Mode MEX-file 'ext_comm':
Failed to connect to the target. A time-out occurred while waiting for the connection response from the target. Possible reasons for the time-out:
a) The target is not switched on.
b) The target is not connected to your host machine.
c) The application for the model is not running on the target. You might have clicked the Stop button. If the Run button is not dimmed, click it. Otherwise, click the Build button, which downloads and runs your application on the target.
Component:Simulink | Category:Block diagram error
Unable to connect to the 'TI Delfino F2837xD' target for 'LED_GPIO31and34'.
On TMDSCNCD28379D A:SW1 is set to:
- Position 1: ON (up)
- Position 2: OFF (down),
and I am using A:J1 connector to load the code and try to connect to External Mode. J2-J7 all jumpers up on ControlCARD.
I have found similar questions already asked and answered on the MATLAB Forum:
- Simulink External Mode not working on Texas Instruments C2000 Launchpad F28377S00-launchpad-f28377s and
- Running TI LaunchPad F28379D in Simulink External Mode
and they suggest to:
- set SCI_A PINS to 42 and 43
- set "Oscillator clock (OSCCLK) frequency in MHz" from 20 to 10
- matche baud rate
I have done all that (as shown in the figures below), but still, I get the error message when trying to Run in External Mode. The code loads okay.
Furthermore, the code is not executed when "Oscillator clock (OSCCLK) frequency in MHz" is set to 10, even during the classical "Deploy to Hardware" process, although it says "Build process completed successfully". I know it does not run because I cannot see any changes on the oscilloscope and pins 82 and 86 and LED do not flash. When I disable "Auto set PLL based on OSCCLK and CPU clock" and set OSCCLK to 10 I get the Warning message as shown above.
Only when OSCCLK is set back to 20 or "Use internal oscillator" is ticked, there is a successful run (and corresponding signal changes are measured on the oscilloscope).
I have also tried to connect via Code -> External Mode Control Panel -> Connect to already loaded and running code on the ControlCARD and I am getting an error
The model that you are trying to run in External mode does not match the application running on your target. Checksum test (TARGET_DATA_MAP) failed. The host model's structural checksum is [4198672845, 2713942319, 662766990, 2906771533] and the target application's structural checksum is [1522194164, 1495588901, 2708835795, 2543970202]. Rebuild the model, run it on your target, and start External mode simulation again.
and (after pressing Connect once again)
Failed to open serial port COM7. Possible causes are:
a) The target is not powered on.
b) The specified port number is not correct.
c) The specified bit rate is not supported by the host machine.
d) The specified port is occupied by another application.
e) The previous connection was not closed correctly. If this is the case, you may need to re-start MATLAB.
Can anyone provide any advice on how to proceed with the External Mode?
Any help would be much appreciated.
Thank you in advance.
One additional question (potential issue): When running External Mode the first step is to load the code. Is this by default? Ideally, I would like to connect to already loaded and running code for monitoring, tuning and recording signals without re-loading and power cycling of the power electronic system. For example, load via USB and later monitor via Serial RS232 (pin 42 and 43) fed to the test bench.