LPC1114 strange behaviour while reading LPC_SYSCTL->PDRUNCFG

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

LPC1114 strange behaviour while reading LPC_SYSCTL->PDRUNCFG

1,523件の閲覧回数
bjoern_harre
Contributor I

I don't understand why the program counter JUMPS. Only the register shall be read. If I would change R2 into 0x0000 0034 manually, the behaviour is ok.

ラベル(1)
0 件の賞賛
返信
6 返答(返信)

1,472件の閲覧回数
bjoern_harre
Contributor I

What flag do I have to set or clear in any register to get access to this LPC_SYSCTL->PDRUNCFG?

0 件の賞賛
返信

1,471件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

You can access all the register in SYSCON module without any condition, for your case, you can access the SYSCON->PDRUNCFG0 directly without any restriction.

 

But for exampler if you access the ADC0 register, you have to enable gated clock for ADC0

set AHBCLKCTRL0[ADC0] bit

If you want to ADC work, you have to do:

set the ADC power by configuring the PDRUNCFG0

configure the correct ADC clock with ADCCLKDIV reg and ADCCLKSEL reg.

xiangjun_rong_0-1728639914461.png

Hope it can help you

BR

XiangJun Rong

0 件の賞賛
返信

1,468件の閲覧回数
bjoern_harre
Contributor I

That is the strange behaviour. If you look at my video you can see at the disassembler site that the register LPC_SYSCTL->PDRUNCFG shall be load in a register. And in that step something strange happenes. The question is, why?

0 件の賞賛
返信

1,489件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

When a module is powered off, it can not be read. If you access the registers of module, you must power the module.

xiangjun_rong_0-1728615583159.png

 

Hope it can help you

BR

XiangJun Rong

 

0 件の賞賛
返信

1,479件の閲覧回数
bjoern_harre
Contributor I

I understand what you mean. But this register LPC_SYSCTL->PDRUNCFG is powered. I can edit it with the debugger.

bjoern_harre_0-1728626935885.png

 

0 件の賞賛
返信

1,474件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

could you clarify your question so that I can understand your issue clearly?

BR

Xiangjun Rong

0 件の賞賛
返信