right now I have a challenging problem and I wonder if someone can support me with this tricky issue.
I want to run my F28379D LaunchPad with a C2000 in Matlab/Simulink in external mode but I receive the error message below:
Error: 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. Error:Unable to connect to the 'TI Delfino F2837xD' target for 'test_led'.
I have already set the required configurations in Simulink Hardware Configuration:
- Code Generation: Toolchain = Texas Instruments Code Composer Studio
- Hardware Board: F28379D
- Target hardware resources:
- Build options: Device Name = F28379D; don't boot from flash; CPU1; don't use custom linker
- External mode: Serial; COM10
Can you please help me with that issue so I can use the LaunchPad to scope signals in real time and tune parameters online.
Thank you for your valuable time and advice.
SOLVED! (with the excellent help of Mathworks Technical Support)
1. Pins GPIO42 and GPIO43 must support SCI_A. For this board, we expect that pins GPIO42 (TX) and GPIO43 (RX) have been configured for SCI_A communication (TX and RX, respectively). Can you please confirm that this is the case?
2. The oscillator frequency must match the LaunchPad's external oscillator frequency. While the F28379D has an internal crystal that oscillates at 20MHz, the LaunchPad also has an external oscillator that runs at 10MHz. Simulink's default value is 20MHz. This setting is appropriate when working with the F28379D alone. However, this frequency value can cause problems when using external mode on a LaunchPad. Please go to Hardware Implementation -> Device details -> Clocking and change the value of "Oscillator clock (OSCCLK) frequency in MHz" from 20 to 10.