Disable autoreset on opening terminal window?

Hi all,

Does anyone know if there's a way of disabling the autoreset on an Arduino Nano Every when a terminal window is opened?

I'm porting some code from a Nano to a Nano Every. The application requires the autoreset to be occasionally disabled so that the Nano continues doing what it's doing even if the terminal window is accidentally closed and opened again.

On the Nano this is simple: one of the digital pins is connected to the reset pin. When autoreset is to be allowed, the digital pin is floating (INPUT mode). When autoreset is to be disabled, this pin is driven HIGH (OUTPUT mode). On opening a terminal window, the reset pin is pulled low for less than a millisecond. Shorting it to a digital pin held HIGH absorbs the pulse, prevents a reset, and the momentary short circuit does not appear to have any detrimental effects. The Nano continues doing its thing and displaying what it was displaying in a newly opened terminal window.

On the Nano Every the reset pin is not pulsed low at all on opening a new terminal window (checked with a logic analyser) so this approach doesn't work.

Any ideas?

Thanks

It would appear this can't be done short of reprogramming the SAM11D. Annoying...

As for the porting of the code from Nano to Nano Every, I've got around it by continually saving the current time into a free slot on a SRAM chip the device uses as well as a flag. On restart, the flag is checked and if set, the code resumes what it was doing based on the timestamp saved in the SRAM chip. Not ideal but it works...

It would appear this can't be done short of reprogramming the SAM11D

That seems pretty silly. The programming implements alternative modes to cause reset.
On the bright side, it seems that the SAMD11 should in fact be re-programmable...

westfw:
That seems pretty silly. The programming implements alternative modes to cause reset.

Yep. At least that’s my understanding. From the Every schematic, the SAMD11 is connected to the 4809 only via the UPDI, TX1 and RX0 lines. During a reset there’s no traffic whatsoever on the TX1 and RX0 lines. So I infer the reset is done by the UPDI. The 4809 datasheet says there’s no access to UPDI registers from the CPU. Hence my conclusion that the autoreset can only be prevented by reprogramming the SAMD11. Unless I’m wrong.

westfw:
On the bright side, it seems that the SAMD11 should in fact be re-programmable…
https://www.arduino.cc/en/Guide/NANOEvery#toc11

Thank you for that, that’s useful to know. Or will be one day. Don’t think I’m quite there yet. :slight_smile: