Skip to content

Commit

Permalink
hw_if: hal: Add watchdog interrupt stats
Browse files Browse the repository at this point in the history
Add watchdog interrupt stats for number of time
interrupt received and ignored.

Signed-off-by: Kapil Bhatt <[email protected]>
  • Loading branch information
kapbh committed Nov 26, 2024
1 parent f9e2abd commit aec7b0b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hw_if/hal/inc/hal_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ struct nrf_wifi_hal_dev_ctx {
unsigned long last_wakeup_now_deasserted_time_ms;
/** RPU sleep opp time */
unsigned long last_rpu_sleep_opp_time_ms;
/** Recieved watchdog timer interrupt */
int watchdog_timer_recieved;
/** Ignored watchdog timer interrupt */
int watchdog_timer_ignored;
#endif /* NRF_WIFI_RPU_RECOVERY */
#if defined(NRF_WIFI_LOW_POWER) || defined(__DOXYGEN__)
/** RPU power state */
Expand Down
2 changes: 2 additions & 0 deletions hw_if/hal/src/hal_interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ static enum nrf_wifi_status hal_rpu_process_wdog(struct nrf_wifi_hal_dev_ctx *ha
* PS_ACTIVE state for more than the timeout period
*/
if (!is_rpu_recovery_needed(hal_dev_ctx)) {
hal_dev_ctx->watchdog_timer_ignored++;
#ifdef NRF_WIFI_RPU_RECOVERY_DEBUG
nrf_wifi_osal_log_info("Ignore watchdog interrupt, RPU recovery not needed");
#else
Expand Down Expand Up @@ -577,6 +578,7 @@ enum nrf_wifi_status hal_rpu_irq_process(struct nrf_wifi_hal_dev_ctx *hal_dev_ct
num_events = hal_rpu_event_get_all(hal_dev_ctx);

if (hal_rpu_irq_wdog_chk(hal_dev_ctx)) {
hal_dev_ctx->watchdog_timer_recieved++;
nrf_wifi_osal_log_dbg("Received watchdog interrupt");

status = hal_rpu_process_wdog(hal_dev_ctx, do_rpu_recovery);
Expand Down

0 comments on commit aec7b0b

Please sign in to comment.