Watch Dog Timer ( 1 ) nRF52 . Watch Dog Timer nRF52 WDT WDT 활용 코드 - WDT 에서 지정한 시간 이내에 main while 문 내의 마지막 에 추가한 WDT리로드 함수 실행 되지 않으면 리셋된다. 즉, 어떤 사유이든 cpu 먹통 된 경우 WDT 가 자동 리셋 해준다. #include "nrf_drv_wdt.h" nrf_drv_wdt_channel_id m_channel_id; static void wdt_event_handler(void) { //NOTE: The max amount of time we can spend in WDT interrupt is two cycles of 32768[Hz] clock - after that, reset occurs } static void init_wdt() { uint32_t err_code .. 2023. 10. 30. 이전 1 다음