LPC8N04 PMU register errors

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

LPC8N04 PMU register errors

1,568 次查看
kenchill
Contributor III

Hi All

This is not a question but an answer to an issue we were having where non-optimised code worked and optimised code didn't work when using PMU registers of the LPC8N04.

If you are having this issue the problem is caused by the PMU access loops in the API getting optimised out.

Solve by wrapping the 'POWER_ReadPmuReg()' and 'POWER_WritePmuReg()' functions with the following to stop optimisation:

#pragma GCC push_options
#pragma GCC optimize ("O0")

...

...

...

#pragma GCC pop_options

Hope this is helpful to someone and saves some frustration.

Ken...

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

1,515 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Ken,

Thank you for your kindness, I think it is helpful to the other engineers.

BR

XiangJun Rong

0 项奖励
回复