{jmp 0} on NANO 33 IoT ?

Hi gents,

i was using an Arduino UNO for some time now and was transfering the code to a NANO 33 IoT.
i've overcome some troubles i had on compatibility, but one last thing i cant find a solution for.

{
  asm volatile ("jmp 0");
}

i use this as software reset during specific situations. my compiler now says that this is a "bad instruction".
it seems this is not supported or a valid command for the 33 IoT.

is that correct and what work around or modified command can i use to initiate a SW-reset?

thanks gents! (and Ladies!)

The obvious question is why you want to reset the bard board in the first place ?

NVIC_SystemReset();

irminsul:
i use this as software reset during specific situations. my compiler now says that this is a “bad instruction”.
it seems this is not supported or a valid command for the 33 IoT.

The Arduino Nano 33 IoT uses a Microchip SAM D21 microcontroller which is based on the ARM Cortex-M0+ processor. This is a 32-bit processor with a completely different architecture and instruction set to the Arduino 8-bit AVR.

The NVIC is a Nested Vector Interrupt Controller it is standardized on the ARM Cortex-M processors. As part of that logic that is outside the processor, there is some logic that can reset the processor. This can be triggered by the function Juraj mentioned.
How much of the system is reset is dependent on the microcontroller implementation. A manufacturer can decide that certain blocks continue to work when a software reset is executed. You will need to check the datasheet.

The same is true for external modules in your case the NINA module. You will need to check whether the NINA module is reset at the beginning. The library could just assume the module is already reset from the power up. There is a signal from the SAMD21 to the NINA called RSTN_NINA. When you are lucky the library uses that when you call the WiFi or BLE begin functions.

Klaus_K:
The Arduino Nano 33 IoT uses a Microchip SAM D21 microcontroller which is based on the ARM Cortex-M0+ processor. This is a 32-bit processor with a completely different architecture and instruction set to the Arduino 8-bit AVR.

The NVIC is a Nested Vector Interrupt Controller it is standardized on the ARM Cortex-M processors. As part of that logic that is outside the processor, there is some logic that can reset the processor. This can be triggered by the function Juraj mentioned.
How much of the system is reset is dependent on the microcontroller implementation. A manufacturer can decide that certain blocks continue to work when a software reset is executed. You will need to check the datasheet.

The same is true for external modules in your case the NINA module. You will need to check whether the NINA module is reset at the beginning. The library could just assume the module is already reset from the power up. There is a signal from the SAMD21 to the NINA called RSTN_NINA. When you are lucky the library uses that when you call the WiFi or BLE begin functions.

WiFiNINA library does a hard reset of NINA over reset pin