This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28335: Error occurred while executing External Mode MEX-file 'ext_comm'

Part Number: TMS320F28335

While facing difficuties when running my Simulink own model on external mode (on my TI F28335), I decided to try the basic example from Mathworks ( de.mathworks.com/.../parameter-tuning-and-signal-logging-with-serial-external-mode.html ) and concluded that not even that works.
I am receiving the same errors. My error message:

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.
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.


So:
I) Code building works straight. The error happens just when trying to run on external mode that example on the DSP, at the end.

II) I tryied other computers, same error.

III) I tried other versions of Matlab (2015, 2017, 2018), none of them works. same error.

IV) I tried other DSP from the same model, same stuff.

V) The Test Target Communication works well on Code composer Studio, and it even can flash TI examples to the DSP (flashing leds). So the Delfino is working and the cable is good.

VI) I tried to use the CCS hardware configuration file on Simulink, no change.

VII) I checked the COM, its right. I even slowed down the Oscillator clock, no improvement. The parameters are equal to the "Device Manager" from Windows config.


Am I doing something stupid? What any other possible reason can exist for Matlab do not access the F28335?
I tried that c28x_serial_ext example because it was suposed to be easy, but not even that works.

Thanks for the support,
Ruben

  • I am forwarding this query to MATLAB tech support.
  • Hi Ruben,

    Here are the suggestions I got from my development team:

    • If you are working with docking station, the position of SW1 is the key. As per the control card info sheet: The position should be OFF.
      • OFF –SW1 in the “OFF” position allows GPIO-28 to be used as a GPIO. Serial communication is still possible, however an external transceiver is needed such as the FTDI – FT2232D chip.
      • This is primarily used for communicating over the USB to serial bridge included in the onboard XDS100 JTAG emulation on many C2000 development boards.
    • And, the J9 connector on the docking station should be closed, i.e a jumper must be put in the place.
    • The GPIO pins are 28 and 29 for SCI Rx and Tx respectively on the control card.

    After these settings the first thing to test is the SCI operation using a tool like Putty just to ensure the Tx and Rx are intact and then move to external mode.

    Also ensure the CCS is not currently running and is closed.

    Cheers,

    -Brian

  • Thank you for your support Brian.
    I spent 3 or 4 minutes to find the J9, but now the external mode works without the need of another serial cable.
    After your tips, it worked at the first try.

    Tks,
    Ruben