MX6q - Different between Analog ARM PLL control Register

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

MX6q - Different between Analog ARM PLL control Register

跳至解决方案
1,540 次查看
anson
Contributor II

Hi,

I'm using imx6q processor. Found that the following registers are identical in structure, but what is the different?

CCM_ANALOG_PLL_ARM  (Addr: 0x020C8000)

CCM_ANALOG_PLL_ARM_SET (Addr: 0x020C8004)

CCM_ANALOG_PLL_ARM_CLR (Addr: 0x020C8008)

CCM_ANALOG_PLL_ARM_TOG (Addr: 0x020C800C)

标签 (1)
0 项奖励
回复
1 解答
1,078 次查看
Yuri
NXP Employee
NXP Employee

Three registers (set, clr, tog) approach is used to optimize bit manipulation.

In order to avoid read – modify – write cycles as separate (non-atomic)

operations (which may be occasionally interrupted), three registers for bit setting,

bit clearing and bit toggle are implemented :

  CCM_ANALOG_PLL_ARM  register has corresponding SET, CLR and TOG registers,

which provide atomic bit manipulations. As the name of the register implies, a value

written to a SET, CLR or TOG register effectively performs the implied operation, but only

bits specified as ‘1’ are modified. Bits specified as ‘0’ are not modified.


Have a great day,
Yuri

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

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,079 次查看
Yuri
NXP Employee
NXP Employee

Three registers (set, clr, tog) approach is used to optimize bit manipulation.

In order to avoid read – modify – write cycles as separate (non-atomic)

operations (which may be occasionally interrupted), three registers for bit setting,

bit clearing and bit toggle are implemented :

  CCM_ANALOG_PLL_ARM  register has corresponding SET, CLR and TOG registers,

which provide atomic bit manipulations. As the name of the register implies, a value

written to a SET, CLR or TOG register effectively performs the implied operation, but only

bits specified as ‘1’ are modified. Bits specified as ‘0’ are not modified.


Have a great day,
Yuri

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

0 项奖励
回复
1,078 次查看
AnsonHuang
NXP Employee
NXP Employee

Hi, Anson

     The register offset of 0x0 is the basic register, you can read or write it. The offset of 0x4 is a set register, which means when you want to set some bits, you don't have to read it out, set the value and then write it into the register, for example, if you want to set bit 0~3 of this PLL register, you can just write 0x7 to 0x20c8004, if you use 0x20c8000 to do same thing, you have to read its value out, then do an "orr" with 0x7, then write it to 0x20c8000. The offset of 0x8 is a clear register, for example, writing a 0x7 to this register will clear bit 0~3. The offset of 0xc is a toggle register, writing 0x1 to this register will make bit 0 toggle.