How can I reset Arduino Nano 33 IoT through Simulink?

To resolve the issue of the Bluetooth connection not being re-established after the initial boot on an Arduino Nano 33 IoT, I would like to reset the Arduino using Simulink. Currently, I achieve this by using the Arduino IDE and calling the "resetFunc();" function, which is defined as:
void(* resetFunc) (void) = 0;
Could you please advise me on how to do this through Simulink?

 Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 9 Mai 2025
Modifié(e) : MathWorks Support Team le 29 Juil 2025

0 votes

You can reset Arduino Nano 33 IoT through Simulink by creating a "Digital Write" block that calls the respective API of the Arm microcontroller that your board is using.
To do this,  refer to the Create a Digital Write Block and follow the steps.
Refer Cortex-M0+ Devices Generic User Guide for additional information on the ARM microcontrollers' API.
You can add custom blocks in Simulink based on MATLAB code by using the MATLAB System Block
I have created an example of creating a "Digital Write" block and importing it to a Simulink model through the "MATLAB System" block, which resets an Arduino Nano 33 IoT, so that you can customize it to your needs. Please note that the example is not an officially released MathWorks product, and I cannot support it further. To Run the example, please follow the instructions below:
1) Download and extract the "exampleReset.zip"
2) Observe in the "Reset.m" at line 45 the call to the "NVIC_SystemReset" command
3) "Build Deploy & Run" the "reset_samd.slx" on the Arduino board

Plus de réponses (0)

Catégories

Produits

Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by