Content originally posted in LPCWare by ian.holmes@xivix.eu on Mon May 11 08:08:50 MST 2015
I have a LPC11C14 and the keil dev environment.
I try to turn off the pullup resistor because I need to pull the line low when an input. I do this like this
LPC_IOCON->PIO1_9 = 0xE0;// Set up 1.9 as I/O not pullup/down, hyst on
and I'm using keil's PLX11xx.h file to define IOCON etc.
When I simulate the compiled application I can see that I have turned off the pull up and turned on hys, but when this hex file is downloaded to the target (via Flashmagic and email as the hardware isn't here with me) the pullup still seems to be enabled.
So I add a printf to read the set up register for PIO1_9 ( uint32_t dummy; dummy = LPC_IOCON->PIO1_9; printf("%0x",dummy);) and the simulator serial window shows "0x0E". But when this is loaded onto the target it reports "0x0D".
Am I missing something obvious with the use of IOCONFIG for this register (0x40044038)?
It's almost as if the LPC11C14 doesn't have configurable pullups/downs
Thanks