Simulink and Arduino Nano Sense problem - external mode "hangs"
45 views (last 30 days)
I am seeing a strange behaviour with Simulink+Arduino-Nano-Sense. In a nutshell: I can't run the Arduino Nano BLE Sense in Simulink's external mode. The symptoms and observed behaviour can be described as:
- The setup of Simulink Arduino hardware package runs nicely and all checks are green (under Windows10 and Matlab 2021a)
- If I set: Hardware Implementation → Target hardware resources → Host-board-connection → Set host COM port → Automatically, then I get: The following error occurred during deployment to your hardware board: Failed to detect host COM port of Nano 33 BLE board....
- If I then set Hardware Implementation → Target hardware resources → Host-board-connection → Set host COM port → Manually and enter the COM-Port-numbers that I get from the Windows device manager, then I can at least press "Build, deplay & Start" (but I must double press the Arduino's reset button first). The model then transfers to the Arduino and it runs.
- If I try to run "Monitor & Tune", then then I get an error: The following error occurred during deployment to your hardware board: Unrecognized function or variable 'portInfo'.
- I can also try to just hit "Connect". Then I get an error: 'External Mode Open Protocol Connect command failed' It provides the following diagnose: Caused by: DWARF Parser internal error: Parser::describeSymbol xcpDummyDoubleVariable is not a global variable
I have difficultied interpreting this. Does someone have an idea?
Arun Kumar on 27 Aug 2021
Hi Max Abildgaard,
The error you are seeing is due to missing drivers of Arduino board. Try to reinstall the drivers and the issue should be fixed.
If you are not able to install the drivers, please use the attached patch files for using the manual com port workflow.
Here are the steps to apply patch:
1. Download the attached files and put them in the same folder.
2. Navigate to the folder created in step 1 above in MATLAB.
3. Run the 'applyPatch.m' file from MATLAB command prompt.
4. Restart MATLAB.
Once this patch is applied, try to set the com port manually and run hit "Mohitor and Tune" button.
Hope this helps!
Please let me know if this solved your problem.