-
Notifications
You must be signed in to change notification settings - Fork 41
fw/lptim_systick: udpate obelix wdt feed logic #471
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: HaiLong Yang <cameled@outlook.com>
Signed-off-by: HaiLong Yang <cameled@outlook.com>
| static WDT_HandleTypeDef hwdt = { | ||
| .Instance = hwp_wdt1, | ||
| }; | ||
| __HAL_WDT_START(&hwdt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
watchdog_start();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is watchdog stopped when entering deepsleep? if so add a comment
| task_watchdog_feed(); | ||
| uint32_t current_counter = LPTIM1->CNT; | ||
| if (current_counter < wdt_last_counter) { | ||
| current_counter += 0x10000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
define magic number, e.g. LPTIM_MAX_CNT
|
|
||
| // Temporarily disable stop mode (GH-452) | ||
| stop_mode_disable(InhibitorMain); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just do git revert -s 25d476dd69eb833e353868132e0864d892af3e94
This contain two changes. The first is using lptim real counter to count wdt feed time. The second is call
__HAL_WDT_STARTto avoid flash access when wakeup from stop mode.Try to fix #452