8 years, 2 months ago.

how can I assign reset function to external button and reset the program?

DigitalIn pin_up(D6); DigitalIn pin_down(D7); InterruptIn pin_start(D8); InterruptIn pin_reset(D9);....need to reset the program at the press of this button DigitalIn pin_delay ( D11);

Question relating to:

Timer peripheral class. This lib. include function ; WAIT, stop, reset, start, and read_ms. myTimer

1 Answer

8 years, 2 months ago.

The myTimer lib is made for to COUNTING a lap-time (milli-sec). This lib can NOT reset the program (reboot).

I understand that you want to reboot at button pushed or delay. If you use NVIC_SystemReset(); func, you can reset. If you need delay time, you use NVIC_SystemReset(); WITH wait() func or watch dog timer.

Accepted Answer