Why am I receiving an XCP timeout error when starting External Mode on an STM32 Board using the "Embedded Coder Support Package for STMicroelectronics STM32 Processors"?
Show older comments
I am using MATLAB R2023a with the "Embedded Coder Support Package for STMicroelectronics STM32 Processors".
I am trying to deploy my model using the external mode, also known as "Monitor & Tune". However, Simulink keeps returning the following error:
Connecting to the target...
Error:External Mode Open Protocol Connect command failed
Caused by:
Could not connect to target application: XCP internal error: timeout expired, in response
to XCP CONNECT command
My model has the following settings:
- Hardware board STM32F4xx Based
- Connectivity: USART3, COM3
- External Mode Communication Interface: Serial
I configured the STM32CubeMX project for the Simulink Model as shown in the documentation pages linked below:
- Serial Configuration for Monitor & Tune and PIL for STM32 Processor-Based Boards
- Monitoring and Tuning Using STMicroelectronics STM32 Processor Based Boards
- Signal Monitoring and Parameter Tuning of Generated PWM Output
I can see in Device Manager that the USB to UART converter is detected at the COM3 port. I have confirmed that COM3 settings on my PC (baudrate, parity etc.) are set just like in the STM32CubeMX USART3 configuration.
Why is Simulink unable to connect for External Mode?
Accepted Answer
More Answers (0)
Categories
Find more on STMicroelectronics Discovery Boards in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


