Unable to validate reboot reason in memfault

Board name: NXP_RW610_c1c2

Good morning community,
I have my firmware for above board.
I want to integrate reboot reason functionality in my firmware with memfault sdk.
I have enable configuration which is suggest in your document.
To check reboot reasons I am trigger fault in fw. That logic is write in main.c file
And some logic is also in memfault_platform_core.c
one time i trigger hardfault and one time manually press reset button on board.
But every time i get same reason. and o ID
How to check my configuration are valid?

I am atteching all with you.
please suggest proper guidance if i am wrong.

main file:
int main(void) {
OS_LOG_INF(“Starting Core1 OS Test application for %s.”, CONFIG_BOARD);
OS_LOG_INF(“Application Version: %s”, APP_VERSION_STRING);
memfault_platform_reboot_tracking_boot(); // Log the last reboot reason
k_sleep(K_SECONDS(5)); // Delay for logs to be visible
trigger_firmware_update_reboot(); // Change this function to test different reboot reasons
return 0;
}

void trigger_firmware_update_reboot(void) {
OS_LOG_INF(“Triggering Firmware Update Reboot…”);
MEMFAULT_REBOOT_MARK_RESET_IMMINENT(kMfltRebootReason_FirmwareUpdate);
memfault_platform_reboot(); // Resets the device
}

// Function to Simulate a Manual Reboot (Power Cycle)
void trigger_manual_reboot(void) {
OS_LOG_INF(“Triggering Manual Reboot…”);
MEMFAULT_REBOOT_MARK_RESET_IMMINENT(kMfltRebootReason_Unknown);
memfault_platform_reboot(); // Resets the device
}

memfault_platform_core.c
MEMFAULT_PUT_IN_SECTION(“.noinit.mflt_reboot_info”)
static uint8_t s_reboot_tracking[MEMFAULT_REBOOT_TRACKING_REGION_SIZE];
void memfault_platform_reboot_tracking_boot(void) {
sResetBootupInfo reset_info = { 0 };
memfault_reboot_reason_get(&reset_info);
OS_LOG_INF(“Previous Reboot Reason: %d”, reset_info.reset_reason);
memfault_reboot_tracking_boot(s_reboot_tracking, &reset_info);
}

log_information:
zcore:~$ Wi-Fi cau temperature : 26
MAC Address: C0:95:DA:01:1E:04
PKG_TYPE: BGA
zcore:~$ *** Booting Zephyr OS build 264c778fb56c ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Scratch: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: primary slot
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x20000
I: Jumping to the first image slot

zcore:~$ Wi-Fi cau temperature : 26
MAC Address: C0:95:DA:01:1E:04
PKG_TYPE: BGA
Set BGA tx power table data
[ 1.097] fs_nvs: 4 Sectors of 4096 bytes
[ 1.097] fs_nvs: alloc wra: 0, fb8
[ 1.097] fs_nvs: data wra: 0, 19
[ 1.097] littlefs: LittleFS version 2.8, disk version 2.1
[ 1.098] littlefs: FS at mx25u51245g@0:0xa60000 is 424 0x1000-byte blocks with 512 cycle
[ 1.098] littlefs: sizes: rd 16 ; pr 16 ; ca 64 ; la 32
*** Booting Zephyr OS build 264c778fb56c ***
[ 1.100] mflt: GNU Build ID: 9ee18a8f424705f1e9a25b09587e994f49ff34d3
[ 1.100] Starting Core1 OS Test application for nxp_rw610_c1c2.
Wi-Fi cau temperature : 26
zcore:~[ 1.100] Application Version: 0.1.0
MAC Address: C0:95:DA:01:1E:04 [ 1.100] Previous Reboot Reason: 0

PKG_TYPE: BGA
Set BGA tx power table data
[ 1.097] fs_nvs: 4 Sectors of 4096 bytes
[ 1.097] fs_nvs: alloc wra: 0, fb8
[ 1.097] fs_nvs: data wra: 0, 19
[ 1.097] littlefs: LittleFS version 2.8, disk version 2.1
[ 1.098] littlefs: FS at mx25u51245g@0:0xa60000 is 424 0x1000-byte blocks with 512 cycle
[ 1.098] littlefs: sizes: rd 16 ; pr 16 ; ca 64 ; la 32
*** Booting Zephyr OS build 264c778fb56c ***
[ 1.100] mflt: GNU Build ID: 9ee18a8f424705f1e9a25b09587e994f49ff34d3
[ 1.100] Starting Core1 OS Test application for nxp_rw610_c1c2.
[ 1.100] Application Version: 0.1.0
[ 1.100] Previous Reboot Reason: 0
zcore:~$ *** Booting Zephyr OS build 264c778fb56c ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Scratch: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: primary slot
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x20000
I: Jumping to the first image slot

zcore:~$ Wi-Fi cau temperature : 26
MAC Address: C0:95:DA:01:1E:04
PKG_TYPE: BGA
Set BGA tx power table data
[ 1.098] fs_nvs: 4 Sectors of 4096 bytes
[ 1.098] fs_nvs: alloc wra: 0, fb8
[ 1.098] fs_nvs: data wra: 0, 19
[ 1.098] littlefs: LittleFS version 2.8, disk version 2.1
[ 1.098] littlefs: FS at mx25u51245g@0:0xa60000 is 424 0x1000-byte blocks with 512 cycle
[ 1.098] littlefs: sizes: rd 16 ; pr 16 ; ca 64 ; la 32
*** Booting Zephyr OS build 264c778fb56c ***
[ 1.101] mflt: GNU Build ID: 9ee18a8f424705f1e9a25b09587e994f49ff34d3
[ 1.101] Starting Core1 OS Test application for nxp_rw610_c1c2.
Wi-Fi cau temperature : 26
zcore:~[ 1.101] Application Version: 0.1.0
MAC Address: C0:95:DA:01:1E:04 [ 1.101] Previous Reboot Reason: 0

PKG_TYPE: BGA
Set BGA tx power table data
[ 1.098] fs_nvs: 4 Sectors of 4096 bytes
[ 1.098] fs_nvs: alloc wra: 0, fb8
[ 1.098] fs_nvs: data wra: 0, 19
[ 1.098] littlefs: LittleFS version 2.8, disk version 2.1
[ 1.098] littlefs: FS at mx25u51245g@0:0xa60000 is 424 0x1000-byte blocks with 512 cycle
[ 1.098] littlefs: sizes: rd 16 ; pr 16 ; ca 64 ; la 32
*** Booting Zephyr OS build 264c778fb56c ***
[ 1.101] mflt: GNU Build ID: 9ee18a8f424705f1e9a25b09587e994f49ff34d3
[ 1.101] Starting Core1 OS Test application for nxp_rw610_c1c2.
[ 1.101] Application Version: 0.1.0
[ 1.101] Previous Reboot Reason: 0

1 Like

Hi Mohit-

I’ll respond to the support email you sent us! For reference (in case anyone else is reading), Memfault’s Zephyr port includes built-in support for reboot tracking, there’s no need to manually implement those functions.

Thanks!
Noah