MCPcopy Create free account
hub / github.com/LowPowerLab/RFM69 / resetUsingWatchdog

Function resetUsingWatchdog

RFM69_OTA.cpp:581–591  ·  view source on GitHub ↗

=================================================================================================================== resetUsingWatchdog() - Use watchdog to reset the MCU ===================================================================================================================

Source from the content-addressed store, hash-verified

579// resetUsingWatchdog() - Use watchdog to reset the MCU
580//===================================================================================================================
581void resetUsingWatchdog(uint8_t DEBUG __attribute__((unused)))
582{
583#ifdef __AVR__
584 if (DEBUG) Serial.print(F("REBOOTING"));
585 wdt_enable(WDTO_15MS);
586 while(1) if (DEBUG) Serial.print(F("."));
587#elif defined(MOTEINO_M0)
588 *((volatile uint32_t *)(HMCRAMC0_ADDR + HMCRAMC0_SIZE - 4)) = 0xF1A507AF;
589 NVIC_SystemReset();
590#endif
591}

Callers 1

CheckForWirelessHEXFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected