Issue connecting Simulink to Arduino Nano 33 IoT
13 views (last 30 days)
Show older comments
I'm having an issue connecting my Arduino Nano 33 IoT to simulink. When I try to run it, I get the error message: "Unrecognized feild name " HostCOMPort" " I'm unsure how to resolve this and would greatly appricate the help!
The device shows up in my device manager and I can run code in Arduino IDE and Matlab without issues. Its only when I use Simulink is there a problem. Im using the cable that came in the Engineering Rev 2 kit from Arduino as well as a usb to usb-c converter to plug into my surface go to connect my computer to the Nano. I am able to run a regular Arduino Uno using the same setup through simiulink.
I've notcied that everytime I try to run the simulink program, the port in the device manager will change from "Arduino Nano 33 IoT" to the bootloader version. And also Matlab will tell me that an arduino device is detected again. My guess is that the Nano is restarting everytime or something? Im not really sure.
0 Comments
Accepted Answer
Abhinav Aravindan
on 20 Aug 2024
Edited: Abhinav Aravindan
on 20 Aug 2024
I have faced a similar issue earlier and performing a clean reinstallation of the support package “MATLAB Support Package for Arduino Hardware” resolved the issue. Additionally, you may try specifying both the “Host COM port” and “Bootloader COM port” in Simulink to build and deploy a design to the board as mentioned in the below documentation:
If you are using versions of MATLAB earlier to R2024a, you may install the latest update available for the MATLAB release you are using as there have been several bug fixes as per the documentation.
I hope this helps resolve your issue!
More Answers (1)
Pratyush
on 20 Aug 2024
Hi Jesse,
To resolve the issue with connecting your Arduino Nano 33 IoT to Simulink, try the following steps:
- Ensure the correct COM port is set in Simulink, as it might change when the device enters bootloader mode.
- Update MATLAB, Simulink, and the Arduino Support Package to the latest versions.
- The board entering bootloader mode is normal; add a delay in your Simulink model to stabilize the connection.
- Ensure correct drivers are installed for the Arduino Nano 33 IoT.
- Ensure External Mode is configured correctly if used.
- Run a simple Simulink model to check if the problem persists.
- Test with a different USB converter or direct connection.
- Consider reinstalling the Arduino Support Package in MATLAB.
Hope this helps.
0 Comments
See Also
Categories
Find more on Modeling in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!