Skip to content

Commit 568ea31

Browse files
ThunderSoft123panyz0725@thundersoft.com
authored andcommitted
Update us_ticker.c
1 parent 7a24b6a commit 568ea31

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

targets/TARGET_TT/TARGET_TT_M3HQ/us_ticker.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,13 @@ void us_ticker_clear_interrupt(void)
8989

9090
void us_ticker_free(void)
9191
{
92-
92+
TSB_T32A0->RUNC = (T32A_RUN_DISABLE | T32A_COUNT_STOP);
93+
us_ticker_inited = false;
94+
TSB_T32A0->STC = 0x0F;
95+
// Clear Pending interrupt in NVIC
96+
NVIC_ClearPendingIRQ(INTT32A00C_IRQn);
97+
// Disable interrupt in NVIC
98+
NVIC_DisableIRQ(INTT32A00C_IRQn);
99+
// Disable Clock.
100+
TSB_CG_FSYSENA_IPENA24 = 0;
93101
}

0 commit comments

Comments
 (0)