=================================================================================================================== resetUsingWatchdog() - Use watchdog to reset the MCU ===================================================================================================================
| 579 | // resetUsingWatchdog() - Use watchdog to reset the MCU |
| 580 | //=================================================================================================================== |
| 581 | void 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 | } |
no outgoing calls
no test coverage detected