Skip to content

Commit

Permalink
[fix][wdg] add wdg access key for wdg resetcounter
Browse files Browse the repository at this point in the history
  • Loading branch information
sakumisue committed Nov 4, 2023
1 parent 587ac54 commit 98e9d23
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/lhal/src/bflb_wdg.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ void bflb_wdg_init(struct bflb_device_s *dev, const struct bflb_wdg_config_s *co
regval |= (config->clock_div << TIMER_WCDR_SHIFT);
putreg32(regval, reg_base + TIMER_TCDR_OFFSET);

putreg16(0xBABA, reg_base + TIMER_WFAR_OFFSET);
putreg16(0xEB10, reg_base + TIMER_WSAR_OFFSET);
regval = getreg32(reg_base + TIMER_WCR_OFFSET);
regval |= TIMER_WCR;
putreg32(regval, reg_base + TIMER_WCR_OFFSET);
Expand Down

0 comments on commit 98e9d23

Please sign in to comment.