NANO 33 IoT serial cycles on and off

New Nano 33 out of box. Installed a sketch from Cloud. A very simple Thing that turns an LED on and off. After the download into NANO, the serial port cycles on and off, connect and disconnect, at about 1/2 hz. Switched the device to MRK1000. NO change to the sketch. Works fine. To get Nano back, because this serial cycle makes it impossible to switch to boot, I double clicked reset to force it to boot, changed comport, upload blink from examples. Unplug and replug to USB. Works again. Any idea why a simple cloud sketch is corrupting memory in NANO flash?

I suspect it is the ArduinoIoTCloud library's watchdog:

https://github.com/arduino-libraries/ArduinoIoTCloud#watchdog

If your sketch blocks the ArduinoCloud.update(), the microcontroller will automatically reset, and then the cycle continues.

You must write your sketch in a non-blocking manner so that the loop continues running, rather than using the delay function.

Information about that here:

Thank you in0. As embarrassing as this may sound, the microcontroller was showing signs of undervoltage. Although I had nothing at all connected to the board, the radio, once activated, drew enough power to force the USB voltage to drop below minimum levels and the microcontroller simply reset. The sketch activated the radio whereas Blink did not. Thanks for your reply, non the less.

I'm glad you found the cause of the problem. Thanks for taking the time to post an update with your findings.

You might be able to solve the problem by using a higher quality USB cable.

I do have those for charging purposes. I never rely on USB power after prototyping. However, this is the first time I experienced this without eternal loads. The MKR1000 was supplying 3.3V to DHT22 and an LED with a 1k limiter and worked fine. So, a bit of a red herring, eh?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.