这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@cameled
Copy link
Contributor

@cameled cameled commented Nov 14, 2025

This contain two changes. The first is using lptim real counter to count wdt feed time. The second is call __HAL_WDT_START to avoid flash access when wakeup from stop mode.

Try to fix #452

@cameled cameled requested a review from gmarull November 14, 2025 16:16
Signed-off-by: HaiLong Yang <cameled@outlook.com>
Signed-off-by: HaiLong Yang <cameled@outlook.com>
@cameled cameled added DNM Do Not Merge and removed DNM Do Not Merge labels Nov 14, 2025
Comment on lines +151 to +154
static WDT_HandleTypeDef hwdt = {
.Instance = hwp_wdt1,
};
__HAL_WDT_START(&hwdt);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

watchdog_start();

Copy link
Collaborator

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;
Copy link
Collaborator

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

Comment on lines -689 to -691

// Temporarily disable stop mode (GH-452)
stop_mode_disable(InhibitorMain);
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Watch randomly reboots or dies when using stop mode on Obelix

2 participants