LPC8N04 PMU register errors

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC8N04 PMU register errors

1,339件の閲覧回数
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,286件の閲覧回数
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 件の賞賛
返信