lpcware

[Solved] IOCON values not sticking

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
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.

Outcomes