[Solved] IOCON values not sticking

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

[Solved] IOCON values not sticking

1,395件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheOtherMike on Tue May 06 01:48:38 MST 2014
For some reason when I attempt to write to a pin's IOCON register, the values never actually take hold.

I have tried setting the register using bit masking:
IOCON_PIO2_10 &= ~0x3F;
IOCON_PIO2_10 |= (1<<4);

I have tried setting the register explicitly:
 IOCON_PIO2_10 = 0b11001000; 

and I have even tried writing to the memory location of PIO2_10 ( 0x4004 4058) directly:
*(pREG32 (0x40044058)) = 0b11001000;

and nothing has worked. Every time I stop at my breakpoint after the write operation in LPCXpresso and check the value of IOCON with the attached LPC-Link, the values are incorrect. I have also verified with a multimeter that the pulldowns aren't being switched in. My question is am I missing something fundamental here?

For reference I have verified that the GPIO peripheral has power, and I am able to change pin directions.
ラベル(1)
0 件の賞賛
返信
3 返答(返信)

1,364件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue May 06 16:45:41 MST 2014

Quote: TheOtherMike
In the words of the immortal Homer Simpson  "D'oh".



I've a shirt for those unforgettable moments ...

[img]http://www.lpcware.com/system/files/Doh.jpg[/img]
0 件の賞賛
返信

1,364件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheOtherMike on Tue May 06 15:34:47 MST 2014
In the words of the immortal Homer Simpson
"D'oh".
That was absolutely the problem. It's funny because I very distinctly remember reading about the AHBCLK system in the user manual and I made sure to double check there to ensure the GPIO clock was enabled.

Thanks a bunch.
0 件の賞賛
返信

1,364件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue May 06 07:13:02 MST 2014

Quote: TheOtherMike
My question is am I missing something fundamental here?



IOCON bit in SYSAHBCLKCTRL  :quest:
0 件の賞賛
返信