Question regarding register memory adress on LCP2368

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

Question regarding register memory adress on LCP2368

跳至解决方案
998 次查看
leanblauth
Contributor I

Hello =)

As I read LCP23XX 's user manual, I am failing to understand how it is possible that one GPIO register doesn't occupy the same memory address as another.

For example: memory address for PORT4 Direction Control Register (FIO4DIR) is 0x3FFFC080. As the port has 32 bit size, it seems to me that the register should occupy the memory addresses from 0x3FFFC080 to 0x3FFFC080 + 31 = 0x3FFFC09F.

Now, for example, looking at the memory address of the respective masking register FIO4MASK, you see that it's 0x3FFFC090, which simultaneously corresponds to the 17th bit of FIO4DIR.

I would apreciate it if someone could be kind enough to cast some light on my confused head. Thanks.

pastedImage_2.png

1 解答
946 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Leandro,

Regarding your question, pls refer to the Table 137.

As you know that each Port has 32 pins, the FIO4DIR0 maps bit0 to bit7, the FIO4DIR1 maps bit8 to bit15, the FIO4DIR2 maps bit16 to bit23, the FIO4DIR0 maps bit24 to bit31. So there are 4 bytes,which locates as

FIO4DIR0            0x3FFF C080

FIO4DIR1            0x3FFF C081

FIO4DIR2            0x3FFF C082

FIO4DIR3            0x3FFF C083

In my opinion, one port direction Registers occupy 4 byte address instead of 32 byte address.

Hope it can help you

BR

XiangJun Rong

pastedImage_2.png

在原帖中查看解决方案

1 回复
947 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Leandro,

Regarding your question, pls refer to the Table 137.

As you know that each Port has 32 pins, the FIO4DIR0 maps bit0 to bit7, the FIO4DIR1 maps bit8 to bit15, the FIO4DIR2 maps bit16 to bit23, the FIO4DIR0 maps bit24 to bit31. So there are 4 bytes,which locates as

FIO4DIR0            0x3FFF C080

FIO4DIR1            0x3FFF C081

FIO4DIR2            0x3FFF C082

FIO4DIR3            0x3FFF C083

In my opinion, one port direction Registers occupy 4 byte address instead of 32 byte address.

Hope it can help you

BR

XiangJun Rong

pastedImage_2.png