cancel
Showing results for 
Search instead for 
Did you mean: 

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

Arslan_Aviacell
Associate
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:
  1. https://www.mathworks.com/help/rtw/nucleo/ug/signal-monitoring-parameter-tune-xcp-on-serial-nucleo.html
  2. https://www.mathworks.com/help/rtw/ug/external-mode-simulation-with-xcp-communication.html
  3. https://www.mathworks.com/help/ecoder/stmicroelectronicsstm32f4discovery/ug/External-mode-PIL.html
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.
 
 
2 REPLIES 2
FD1
Associate

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.

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