Could not connect to XCP slave: XCP Master internal error: Busy(0) or no timeout(2) for 255
155 次查看（过去 30 天）
Daniel Gelman ，2020-4-17
回答： Nils Böhringer ，2021-1-26
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)
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.
Wongsatorn Phongphaetsart 2020-12-25
Do you fixed it?
I have same problem and need your help.
Cihan YURTSEVER 2021-1-20
Im having the same problem for Arduino Due. Could someone please help us?
Nils Böhringer 2021-1-26
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 ....
Find more on ARM Cortex-M Processors 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!