Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nrf_wifi: Decrease MCU boot timeout #1235

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions nrf_wifi/hw_if/hal/src/hal_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -1599,15 +1599,15 @@ enum nrf_wifi_status nrf_wifi_hal_proc_reset(struct nrf_wifi_hal_dev_ctx *hal_de
return status;
}


#define MCU_FW_BOOT_TIMEOUT_MS 1000
enum nrf_wifi_status nrf_wifi_hal_fw_chk_boot(struct nrf_wifi_hal_dev_ctx *hal_dev_ctx,
enum RPU_PROC_TYPE rpu_proc)
{
enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL;
unsigned int addr = 0;
unsigned int val = 0;
unsigned int exp_val = 0;
unsigned int i = 0;
unsigned int mcu_ready_wait_count = MCU_FW_BOOT_TIMEOUT_MS / 10;

if (rpu_proc == RPU_PROC_TYPE_MCU_LMAC) {
addr = RPU_MEM_LMAC_BOOT_SIG;
Expand All @@ -1624,7 +1624,7 @@ enum nrf_wifi_status nrf_wifi_hal_fw_chk_boot(struct nrf_wifi_hal_dev_ctx *hal_d

hal_dev_ctx->curr_proc = rpu_proc;

while (i < 1000) {
while (mcu_ready_wait_count-- > 0) {
status = hal_rpu_mem_read(hal_dev_ctx,
(unsigned char *)&val,
addr,
Expand All @@ -1644,12 +1644,9 @@ enum nrf_wifi_status nrf_wifi_hal_fw_chk_boot(struct nrf_wifi_hal_dev_ctx *hal_d
/* Sleep for 10 ms */
nrf_wifi_osal_sleep_ms(hal_dev_ctx->hpriv->opriv,
10);

i++;

};

if (i == 1000) {
if (mcu_ready_wait_count <= 0) {
nrf_wifi_osal_log_err(hal_dev_ctx->hpriv->opriv,
"%s: Boot_sig check failed for RPU(%d), "
"Expected: 0x%X, Actual: 0x%X",
Expand Down
Loading