summaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorSean Cross <sean@xobs.io>2020-05-22 19:34:54 +0800
committerSean Cross <sean@xobs.io>2020-05-27 11:28:49 +0800
commit5edc29c6a592fc70f6d273dc89c3dd1be8afcb13 (patch)
tree2248c06a7ccb2177bbd44d3b6404433b8fcd9e34 /ports
parentc7efc94a336091a1e6d79e94a9e80b31e5d5fc3f (diff)
nrf: microcontroller: use port reset path
For `microcontroller.reset()`, don't manually call NVIC_SystemReset(). Instead, call the `port_reset()` in case the port wants to do any cleanup. Signed-off-by: Sean Cross <sean@xobs.io>
Diffstat (limited to 'ports')
-rw-r--r--ports/nrf/common-hal/microcontroller/__init__.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/nrf/common-hal/microcontroller/__init__.c b/ports/nrf/common-hal/microcontroller/__init__.c
index 187b46ad1..cc5f2a285 100644
--- a/ports/nrf/common-hal/microcontroller/__init__.c
+++ b/ports/nrf/common-hal/microcontroller/__init__.c
@@ -94,7 +94,7 @@ void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) {
void common_hal_mcu_reset(void) {
filesystem_flush();
- NVIC_SystemReset();
+ reset_cpu();
}
// The singleton microcontroller.Processor object, bound to microcontroller.cpu