Page 1 of 1

[solved] reset the CF from the firmware

Posted: Thu Nov 05, 2020 11:47 am
by wydmynd
hi, -
I want to make an app that in some error conditions will reset the CF (like resetting STM32 using NRF from the cflib)
searched google and found there is a command - NVIC_SystemReset() but in the CF firmware could not find that it is defined.

does anyone know if this is plausible to implement ?
if not, how would you "reset" the firmware, like what happens when there is a watchdog reset - watchdogReset() in watchdog.h
(did not exactly understand the implementation)

Thanks!!

Re: reset the CF from the firmware

Posted: Fri Nov 06, 2020 7:55 am
by arnaud
The function NVIC_SystemReset will reset the STM32 so you can use that.

To use it, you need to include code_cm4.h since it is an inline function declared in this header file:

Code: Select all

#include "core_cm4.h"
A note about the watchdog: the watchdog resets the CPU in hardware and not in software, this is why you cannot see any software that resets the CPU associated with the watchdog.

Re: reset the CF from the firmware

Posted: Sun Nov 08, 2020 4:53 pm
by wydmynd
thanks! will report if it works

Re: reset the CF from the firmware

Posted: Sun Nov 29, 2020 9:28 am
by wydmynd
tested. works.

Re: [solved] reset the CF from the firmware

Posted: Tue Dec 08, 2020 7:17 am
by wydmynd
update: after resetting, if using flow sensor, I get the message - "Error while initializing the PMW3901 sensor"

So currently I'm abandoning this method.

Re: [solved] reset the CF from the firmware

Posted: Tue Dec 08, 2020 9:57 am
by kimberly
ah really? It works with the lighthouse deck, but we haven't tried this with the flowdeck. We will investigate this soon.

Re: [solved] reset the CF from the firmware

Posted: Wed Dec 16, 2020 8:17 am
by wydmynd
will be happy to hear if there is any update. thx!

Re: [solved] reset the CF from the firmware

Posted: Wed Dec 16, 2020 10:09 am
by kimberly
We haven't gotten around to it.... Could you provide your app with a minimal example so that we can try it ourselves?