ESP32, NVS, nvs_rw_blob
보드의 Boot (GPIO_0) 버튼을 1초 이상 누르면 리셋이 되며
이 때 보드 동작 시간을
uint32_t blob 형태로 연속 저장합니다.
"Boot 1 time", "Boot 2 time", ...
esp-idf\components\nvs_flash\include\nvs_flash.h
esp-idf\components\nvs_flash\include\nvs.h
esp-idf\components\driver\include\driver\gpio.h
0. 참고 사이트
1. 모듈
2. 보드 연결
3. 소스 설명
동작 시간 : xTaskGetTickCount() * portTICK_PERIOD_MS
4. 소스
5. 결과 확인
I (0) cpu_start: App cpu up. I (216) heap_init: Initializing. RAM available for dynamic allocation: I (222) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (228) heap_init: At 3FFB3340 len 0002CCC0 (179 KiB): DRAM I (235) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM I (241) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (247) heap_init: At 40088DDC len 00017224 (92 KiB): IRAM I (254) cpu_start: Pro cpu start user code I (272) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. Restart counter = 0 Run time: Nothing saved yet! Restarting...
I (197) cpu_start: App cpu up. I (216) heap_init: Initializing. RAM available for dynamic allocation: I (223) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (229) heap_init: At 3FFB3340 len 0002CCC0 (179 KiB): DRAM I (235) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM I (242) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (248) heap_init: At 40088DDC len 00017224 (92 KiB): IRAM I (254) cpu_start: Pro cpu start user code I (272) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. Restart counter = 1 Run time: 1: 37490 Restarting...
I (197) cpu_start: App cpu up. I (216) heap_init: Initializing. RAM available for dynamic allocation: I (223) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (229) heap_init: At 3FFB3340 len 0002CCC0 (179 KiB): DRAM I (235) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM I (242) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (248) heap_init: At 40088DDC len 00017224 (92 KiB): IRAM I (254) cpu_start: Pro cpu start user code I (272) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. Restart counter = 2 Run time: 1: 37490 2: 6680
|