Showing results for 
Search instead for 
Did you mean: 

XCP internal error: timeout expired' error during for STM32F767ZI on MATLAB Simulink

I am using the Embedded Coder Hardware Support Package for STM32 F7xx based development board (Model Settings > Hardware Implementation > Hardware Board: STM32F7xx Based) for my model of implementing Field Oriented Control (FOC).
When I run the model using 'Monitor and Tune', it builds the model but at the end, it gives the error that: 'XCP internal error: timeout expired'.
All the peripherals are configured in both the Simulink file and STM32 CubeMX file but after it builds the model, at runtime it gives this 'XCP' communication failure error.
I followed the three links given below in order to resolve this issue, but it didn't work:
Also, the communication of F767ZI board with STM32 Motor Control Workbench also disconnects after starting the motor from Workbench GUI. 
The full error text is below:
XCP Error Proof.JPG
Please help in this regard what should I do in order to solve this problem and implement FOC controller using Simulink.
Thank you.

I have exactly the same issue. If you use the Simulink Coder Support Package for STMicroelectronics Nucleo Boards the XCP issue is solved, however the package does not have support for hardware interrupts and PWM generation using timers.

Associate II

I am using embedded coder for STM32G474 board and I don't use External Mode, so I just Build and Deploy from Simulink, but the debug is made through SPI.


Have you considered using an external USB-TTL for "External mode"?

Then you would launch the app, and then Monitor. You only loose the Tune capability.