EmbeddedRelated.com
Forums

[lpc1114] can't blink PIO0_0

Started by Wouter van Ooijen December 10, 2012
I am experimenting with the LPC1114FN28/102, the DIP28 version of the
LPC1114. I use lpc21isp to download to the chip (I added the extra line
to support this chip as suggetsed by
http://www.meatandnetworking.com/tutorials/lpc1114fn28-with-open-source-tools/).
The reset pin of this chip doubles as PIO0_0, so I was curious to see
how the bootload process would go when that pin is repurposed as PIO0_0.
I tried to blink that pin, but to no avail. I can blink the other pins,
bit not PIO0_0 aka RESET. I did add

LPC_IOCON->RESET_PIO0_0 |= 0x01;

and the equivalent

*(volatile uint32_t *)( 0x4004400c ) |= 0x01;

needed because the reset mode of this pin is reset, not GPIO, but still
no blinky.

Am I missing something?

Wouter van Ooijen

An Engineer's Guide to the LPC2100 Series

On 10/12/2012 15:55, Wouter van Ooijen wrote:
> I am experimenting with the LPC1114FN28/102, the DIP28 version of the
> LPC1114. I use lpc21isp to download to the chip (I added the extra line
> to support this chip as suggetsed by
> http://www.meatandnetworking.com/tutorials/lpc1114fn28-with-open-source-tools/).
>
> The reset pin of this chip doubles as PIO0_0, so I was curious to see
> how the bootload process would go when that pin is repurposed as PIO0_0.
> I tried to blink that pin, but to no avail. I can blink the other pins,
> bit not PIO0_0 aka RESET. I did add
>
> LPC_IOCON->RESET_PIO0_0 |= 0x01;
>
> and the equivalent
>
> *(volatile uint32_t *)( 0x4004400c ) |= 0x01;
>
> needed because the reset mode of this pin is reset, not GPIO, but still
> no blinky.
>
> Am I missing something?
I thought at first that it might be an input only pin, as is the case
with most PICs, but the data sheet has it as an I/O pin.

I modified one of my LPC2114 test programs and got output from the reset
pin (pin 23).

I'll put the program on my web site if you still have problems.

Leon
--
Leon Heller
G1HSM
> I thought at first that it might be an input only pin, as is the case
>
> with most PICs, but the data sheet has it as an I/O pin.
>

That's the first thing I checked too.
> I modified one of my LPC2114 test programs and got output from the reset
> pin (pin 23).
>

LPC1114, not PLC2114? In that case, please post (or email wouter ape
voti.nl)

W


On 10/12/2012 16:53, Wouter van Ooijen wrote:
> > I thought at first that it might be an input only pin, as is the case
> >
> > with most PICs, but the data sheet has it as an I/O pin.
> > That's the first thing I checked too.
> >
> >
> > I modified one of my LPC2114 test programs and got output from the reset
> > pin (pin 23).
> > LPC1114, not PLC2114? In that case, please post (or email wouter ape
> voti.nl)

Here you are:

http://www.leonheller.com/LPC1114%20(DIP28)/Flasher2.c

I used the Rowley CrossWorks compiler.

Leon
--
Leon Heller
G1HSM
>http://www.leonheller.com/LPC1114%20
(DIP28)/Flasher2.c.

Thanks, works as advertised (compiled without any change using GCC, I am
beginning to get some sympathy for that common CMSIS stuff!).

And it showed what I suspected: when you configure RESET as PIO0_0 you
need a power cycle to enable the bootloader.

Once I have that in place I'll dig into what I did wrong.

thanx,
Wouter van Ooijen


> Once I have that in place I'll dig into what I did wrong.

That did not take long.

LPC_SYSCON->SYSAHBCLKCTRL |= (1<<16); //enable IOCON

These chips start off with most of their peripherals disabled. In that
state you can write to the pin configuration registers till hell freezes
over, but nothing will happen :(

W