Skip to content

Soft reset when closing USB serial connection on micro:bit V2 #36

Open
@jhmaloney

Description

@jhmaloney

I'm using n-able-Arduino and NimBLE on a micro:bit v2.

My application allows the user to open and close the USB serial port to communication with the board. With the board connected to the computer via a USB cable, I can connect and communicate with it over the serial port. However, when I close the serial port, the board does a soft reset. (_resetReason, which is read from NRF_POWER->RESETREAS at startup, is 4.)

I'd like it to simply continue running when the serial port is closed, as it does when I use Earle Philhower's Arduino framework.

I don't think it is the watchdog timer. I have that disabled and, anyhow, that would give a different reset reason.

Is some event my application should be handling? Other ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions