Bug in example under periph_wkt. Code still runs okay!

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bug in example under periph_wkt. Code still runs okay!

544 Views
hmyoong
Contributor III

For the example program for LPC82x Xpresso V2 board, 

periph_wkt/examples/src/wkt.c, inside the main() function

/* Disable wakeup pad */
Chip_PMU_ClearPowerDownControl(LPC_PMU, PMU_DPDCTRL_WAKEPAD | PMU_DPDCTRL_LPOSCDPDEN);

/* Disable wakeup hysteresis by setting the bit (set to disable), enable 10KHz oscillator for all power down modes including deep power-down */
Chip_PMU_SetPowerDownControl(LPC_PMU, PMU_DPDCTRL_WAKEUPPHYS | PMU_DPDCTRL_LPOSCEN |
PMU_DPDCTRL_LPOSCDPDEN);

It seems that the code should be

/* Disable wakeup pad */
Chip_PMU_ClearPowerDownControl(LPC_PMU, PMU_DPDCTRL_WAKEPAD);

/* Enable wakeup hysteresis by setting the bit, enable 10KHz oscillator for all power down modes including deep power-down */
Chip_PMU_SetPowerDownControl(LPC_PMU, PMU_DPDCTRL_WAKEUPPHYS | PMU_DPDCTRL_LPOSCEN |
PMU_DPDCTRL_LPOSCDPDEN);

Labels (1)
0 Kudos
1 Reply

364 Views
jeremyzhou
NXP Employee
NXP Employee

Hi HM Yoong,

Thanks for your sharing.
Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos