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

cpu/nrf5x/timer: fix high current consumption in powered off state #18953

Merged
merged 1 commit into from
Nov 23, 2022
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
24 changes: 23 additions & 1 deletion cpu/nrf5x_common/periph/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,29 @@ void timer_start(tim_t tim)

void timer_stop(tim_t tim)
{
dev(tim)->TASKS_STOP = 1;
/* Errata: [78] TIMER: High current consumption when using
* timer STOP task only
*
* # Symptoms
*
* Increased current consumption when the timer has been running and the
* STOP task is used to stop it.
*
* # Conditions
* The timer has been running (after triggering a START task) and then it is
* stopped using a STOP task only.
*
* # Consequences
*
* Increased current consumption.
*
* # Workaround
*
* Use the SHUTDOWN task after the STOP task or instead of the STOP task
*
* cf. https://infocenter.nordicsemi.com/pdf/nRF52833_Engineering_A_Errata_v1.4.pdf
*/
dev(tim)->TASKS_SHUTDOWN = 1;
}

static inline void irq_handler(int num)
Expand Down