XCP timeout error in MATLAB Simulink when trying to monitor code on Nucleo STM32G431RB
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I am trying to monitor a simple model build in MATLAB Simulink and running on my Nucleo STM32G4321RB board.
Building and deploying the model on the controller is possible, the code is running properly. But when I try to use the external mode function in Simulink, to monitor the running code, there is an error:
"XCP internal error: timeout expired, in response to XCP CONNECT command".

The model itself is very simple. Read digital input from User-Button and output state to User-LED.
According to the user manual UM2505 from ST, on the G431RB-board the LPUART1 is connected to STLINK-V3E Virtual COM Port by default.
So I have setup the LPUART1 in CubeMX in asynchronous mode at 115200 Bits/s.
And also configured the Simulink model for LPUART1 and COM3 (as given by Windows device manager)

But it just won't work. And I could not find any helpful answers on google for this problem.
I also tried UART1 and UART3 in desperation, but that's not working either, of course.
Does anyone have an idea, how to get this running?
Thanks for your help.
0 Kommentare
Antworten (1)
Malay Agarwal
am 16 Jun. 2023
Bearbeitet: Malay Agarwal
am 16 Jun. 2023
Hi Max,
It can be possible that the COM port specified (COM3) in the Connectivity Tab in Configuration Parameters > Hardware Implementation > Target hardware resources is incorrect.
I would suggest making sure that this is the correct port via Device Manager. Launch Device Manager and look under the Ports and LPT section. You should see your board with the COM port mentioned in parentheses.
You can refer to the following link for a question similar to yours: Why am I unable to connect to target? The model throws an error: "External Mode Open Protocol Connect command failed Cau... - MATLAB Answers. The link also has other suggestions that you can try.
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!