diff --git a/build/tools/amebasmart/gnu_utility/km0_km4_app.bin b/build/tools/amebasmart/gnu_utility/km0_km4_app.bin index 73fe0ef43b..8625bc31f8 100644 Binary files a/build/tools/amebasmart/gnu_utility/km0_km4_app.bin and b/build/tools/amebasmart/gnu_utility/km0_km4_app.bin differ diff --git a/build/tools/amebasmart/gnu_utility/km0_km4_app_RELEASE_NOTE.txt b/build/tools/amebasmart/gnu_utility/km0_km4_app_RELEASE_NOTE.txt index af8a8d69ac..358caaf5f0 100644 --- a/build/tools/amebasmart/gnu_utility/km0_km4_app_RELEASE_NOTE.txt +++ b/build/tools/amebasmart/gnu_utility/km0_km4_app_RELEASE_NOTE.txt @@ -1,5 +1,8 @@ /* == "version" + "Realtek git version" + "compile date" + "compile time" == */ +== version 4d319ca58b 2026/03/19-17:20:22 == +1. Add recovery mechanism for IPC dev + == version 4d319ca58b 2026/02/12-20:08:13 == 1. Prefer 5GHz network when both 2.4GHz and 5GHz are available on same shared SSID diff --git a/os/arch/arm/src/amebasmart/amebasmart_reboot_reason.c b/os/arch/arm/src/amebasmart/amebasmart_reboot_reason.c index a720908645..6193e8c744 100644 --- a/os/arch/arm/src/amebasmart/amebasmart_reboot_reason.c +++ b/os/arch/arm/src/amebasmart/amebasmart_reboot_reason.c @@ -81,6 +81,10 @@ static reboot_reason_code_t up_reboot_reason_get_hw_value(void) BKUP_Write(BKUP_REG2, 0); boot_reason = REBOOT_SYSTEM_NP_LP_FAULT; } + else if (boot_reason_reg2 == 0x5) { + BKUP_Write(BKUP_REG2, 0); + boot_reason = REBOOT_SYSTEM_CA32_IPC_ERROR; + } return boot_reason; } else { /* Read AmebaSmart Boot Reason, WDT and HW reset supported */ @@ -141,7 +145,13 @@ static reboot_reason_code_t up_reboot_reason_get_hw_value(void) if (boot_reason & AON_BIT_RSTF_APSYS) { /* CA32 */ lldbg("Reboot reason: APSYS reset\n"); } else if (boot_reason & AON_BIT_RSTF_NPSYS) { /* KM4 */ - lldbg("Reboot reason: NPSYS reset\n"); + if (boot_reason_reg2 == 0x4) { + BKUP_Write(BKUP_REG2, 0); + lldbg("Reboot reason: KM4 IPC error\n"); + } + else { + lldbg("Reboot reason: NPSYS reset\n"); + } } else { /* (boot_reason & AON_BIT_RSTF_LPSYS) */ lldbg("Reboot reason: LPSYS reset\n"); } diff --git a/os/arch/arm/src/amebasmart/amebasmart_reboot_reason.h b/os/arch/arm/src/amebasmart/amebasmart_reboot_reason.h index 8ba5e31044..f145ecbb7d 100644 --- a/os/arch/arm/src/amebasmart/amebasmart_reboot_reason.h +++ b/os/arch/arm/src/amebasmart/amebasmart_reboot_reason.h @@ -28,6 +28,7 @@ enum { REBOOT_SYSTEM_TZWD_RESET = REBOOT_BOARD_SPECIFIC4, /* TrustZone Watch dog */ REBOOT_SYSTEM_NP_LP_FAULT = REBOOT_BOARD_SPECIFIC5, /* Reset due to fault in KM4/KM0 */ REBOOT_SYSTEM_RESET_IWDG = REBOOT_BOARD_SPECIFIC6, /* System reset by IWDG*/ + REBOOT_SYSTEM_CA32_IPC_ERROR = REBOOT_BOARD_SPECIFIC7, /* CA32 reset due to error in CA32 IPC */ }; #endif /* __AMEBASMART_REBOOT_REASON_H__ */ diff --git a/os/board/rtl8730e/src/component/wifi/inic/inic_ipc_host_api.c b/os/board/rtl8730e/src/component/wifi/inic/inic_ipc_host_api.c index 8a0ad4b91a..207e6c3521 100644 --- a/os/board/rtl8730e/src/component/wifi/inic/inic_ipc_host_api.c +++ b/os/board/rtl8730e/src/component/wifi/inic/inic_ipc_host_api.c @@ -460,6 +460,8 @@ int inic_ipc_api_host_message_send(u32 id, u32 *param_buf, u32 buf_len) } if (cnt == 0) { dbg_noarg("HstMsgSend wait inic ipc done 0x%x, 0x%x\n", g_host_ipc_api_request_info.API_ID, latest_api_id); + /* Indicate to KM4 that host IPC is stuck waiting for ACK */ + BKUP_Write(BKUP_REG2, 0x4); } } ret = g_host_ipc_api_request_info.ret; diff --git a/os/board/rtl8730e/src/rtl8730e_boot.c b/os/board/rtl8730e/src/rtl8730e_boot.c index 0b9af2d2aa..4e6e81262f 100644 --- a/os/board/rtl8730e/src/rtl8730e_boot.c +++ b/os/board/rtl8730e/src/rtl8730e_boot.c @@ -382,7 +382,8 @@ static void np_lp_status_timer_hdl(void) { /* Added to inspect the value of BKUP_REG2 */ u32 boot_reason_reg2 = BKUP_Read(BKUP_REG2); - if (boot_reason_reg2 != 0x0) { + /* Catch fault in NP/LP, 0x1 indicates hard fault, 0x5 indicates IPC dev waiting for ACK */ + if (boot_reason_reg2 == 0x1 || boot_reason_reg2 == 0x5) { lldbg("boot_reason_reg2 0x%x \n", boot_reason_reg2); ASSERT(boot_reason_reg2 == 0x0); }