7 years, 1 month ago.

Do we have to divide SystemCoreClock by 64 (=16*4) instead of 16 ?

Hi Thatcher,

It works on LPC1114! However, the watchdog timer expires four times longer than expected.

LPC_SYSCON->WDTCLKDIV = 0x10; uint32_t clk = SystemCoreClock/16; WD has a fixed /4 prescaler, PCLK default is /4

You set 0x10 (=16) to WDTCLKDIV and devide SystemCoreClock by 16. The Watchdog consists of a fixed divide-by-4 pre-scaler.

So, do we have to divide SystemCoreClock by 64 (=16*4) instead of 16 ?

LPC_SYSCON->WDTCLKDIV = 0x10; uint32_t clk = SystemCoreClock/64; WD has a fixed /4 prescaler, PCLK default is /4

Question relating to:

The common example for running a watchdog timer on mbed processors doesn't work for the LPC1114, a common and easily-breadboardable ARM chip. My program provides a watchdog class that works … LPC1114, timer, watchdog
Be the first to answer this question.