Bug in example under periph_wkt. Code still runs okay!

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Bug in example under periph_wkt. Code still runs okay!

922 次查看
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);

标签 (1)
0 项奖励
回复
1 回复

742 次查看
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 项奖励
回复