Hello,
How can I "reset by software" the R4 ?
An idea ?
It's not an Arduino R3
Hello,
How can I "reset by software" the R4 ?
An idea ?
It's not an Arduino R3
The advice I've generally seen is to use the Watchdog timer and force that to reset it.
Thanks for the quick answer,
but the microcontroller on the R4 is a Renesas and not an AVR...
On UNO R4 you have NVIC_SystemReset();
for immediate reset.
(There's also a pending proposal for a nicer, portable, command for that)
Why do you need to reset it?
Thank you it's perfect !
Does your software crash, is that why you are resetting it?
My Arduino R4 drive via I2C some other card raspberry pi pico RP2040, and sometimes the I2C crash (I must investigate more precisely...) So the reset for all modules is my solution for the moment. (It's not really a good solution, but she works ...)
All 4 of my Uno R4's are connected to ArduinoCloud. Works great for a while, then after 1 hour or 10 days, they enter a loop where every 500mS it says its trying to reconnect to the cloud. It stays in this loop forever. Generally associated with reading A0 input, but I've seen it do this even when I have no analogReads. Doesn't happen on my nano esp32.
It happens in both of my homes. Its kind of hard to reach the reset button 85 miles away, so I would like to reset the R4 when this function gets called.
ArduinoCloud.addCallback(ArduinoIoTCloudEvent::DISCONNECT, doThisOnDisconnect);
I have confirmed this function is getting called when it enters this endless loop.
Hi @alranel - is there a way to reset the ESP32 module?
I have constant failures for the BLE module failing to start and even if you use this NVIC_SystemReset command the BLE module will continue to fail to start until power is completely removed from the board from all sources.
Maybe take look at this post
At thr part
static const char RESET[] = "AT+RESET\n";
Serial2.write(RESET, sizeof(RESET) - 1);
That works great - thank you @KurtE !