NANO130: Enlarge timeout in CLK_WaitClockReady(...)

Most code doesn't check return code of CLK_WaitClockReady(...). Enlarge timeout to meet most cases.

lp_ticker initialization fails with this issue. Steps for reproducing:
1.  System runs in tickless from lp_ticker mode.
2.  Arm WDT reset.
3.  In next reset cycle, lp_ticker initialization fails (active flag doesn't become active).
pull/12604/head
Chun-Chieh Li 2020-03-09 16:46:13 +08:00
parent 4fa9ccacf6
commit dbd34ed63e
1 changed files with 1 additions and 1 deletions

View File

@ -613,7 +613,7 @@ uint32_t CLK_WaitClockReady(uint32_t u32ClkMask)
{
int32_t i32TimeOutCnt;
i32TimeOutCnt = __HSI / 200; /* About 5ms */
i32TimeOutCnt = __HSI / 20; /* About 50ms */
while((CLK->CLKSTATUS & u32ClkMask) != u32ClkMask) {
if(i32TimeOutCnt-- <= 0)