Could not connect to XCP slave: XCP Master internal error: Busy(0) or no timeout(2) for 255

38 vues (au cours des 30 derniers jours)
Daniel Gelman
Daniel Gelman le 17 Avr 2020
Commenté : Huy le 7 Nov 2023
Hello,
I've used the S-Function Builder to use an Arduino library in Simulink. Specifically, I am trying to use the AccelStepper() library using an Arduino Due. I followed the steps showed here: https://www.youtube.com/watch?v=_OLctOFjjYQ
After hitting Monitor & Tune, the model looks like it successfully builds but then I get prompted with this error:
=== Simulation (Elapsed: 47 sec) ===
### Starting build procedure for: cfc_sim_test
ARM Memory Usage
----------------------
device - ARM Cortex-M3
Program: 38732 bytes (7.4% Full)
(.text)
Data: 36708 bytes (37.3% Full)
(.data + .bss)
### Deployed code to target successfully
### Successful completion of build procedure for: cfc_sim_test
Build process completed successfully
Error:External Mode Open Protocol Connect command failed
Error:Unable to connect to the 'Arduino Due' target for 'cfc_sim_test'.
I also get a window prompt:
Executing the 'Connect' command produced the following error: Could not connect to XCP slave: XCP Master internal error: Busy(0) or no timeout(2) for 255.
Its important to note that this only occurs when the S-Function is present in the model. If the S-Function is commented out, the model can compile and run. When I switch to an Arduino Mega, the S-Function can compile and run. Something with Due + S-Function is causing this error.

Réponses (4)

Wongsatorn Phongphaetsart
Wongsatorn Phongphaetsart le 25 Déc 2020
Do you fixed it?
I have same problem and need your help.
Thankyou.

liangmaokun liangmaokun
liangmaokun liangmaokun le 28 Déc 2020
I still have same problem and need your help.

Cihan YURTSEVER
Cihan YURTSEVER le 20 Jan 2021
Im having the same problem for Arduino Due. Could someone please help us?

Nils Böhringer
Nils Böhringer le 26 Jan 2021
I got the same error while running a bigger External Mode Programm (without an S-function) on the Due.
I solved it by decreasing the Fixed-step size in the Solver or setting it to "auto".
My guess is this error ocurrs because the server which is set of while running the external Mode wants an update form the variables and the Due isnt finhished calculating the latest step. Then a timeout Problem ocurrs and the connection breaks off.
The Due has so much computing power that it shouldnt be a Problem but ....

Produits


Version

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by