Porting to LPC1114FN28

ChibiOS public support forum for topics related to the NXP LPC family of Cortex-M micro-controllers.
tmune
Posts: 2
Joined: Sat Aug 17, 2013 3:49 pm

Porting to LPC1114FN28

Postby tmune » Sat Aug 17, 2013 4:10 pm

Hello all,
I'm trying to port the OS to LPC1114FN28. I know there is LPC1114 version exits. I'm proting the version to my hardware. I had an error of "ram overflowed by 88 bytes" because the the version of 1114 used has only 4KB sram. I modified lpc1114.ld to set __main_stack_size__ = 0x0100. Now I have a clean compilation and get ch.hex.
My questions are;
Can the stack size be 0x100?
also
Does the os require the ouside crystal like LPC1114Xpresso board? I'm trying to use the internal clock. I don't know where to look for the system clock setup?
Any help is greatly appreciated.
Thanks

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: Porting to LPC1114FN28

Postby Giovanni » Sat Aug 17, 2013 6:38 pm

Hi,

256 bytes should be enough, that space is the stack used by the main() function so it depends on what you do there.

Clock settings are located in mcuconf.h.

Giovanni

tmune
Posts: 2
Joined: Sat Aug 17, 2013 3:49 pm

Re: Porting to LPC1114FN28

Postby tmune » Mon Aug 19, 2013 6:49 pm

Thanks for your quick reply, Giovanni.
I have not finished porting yet but I have another question.
when I write a code like,
LPC_GPIO0->MASKED_ACCESS[1 << 7 ] = 1 << 7;
Is this equivalent to
writing Mask register at GPIO0 address + 7 = 0x80 and
writing Data register at GPIO0 address(0x50003FFC) = 0x80
I could not find where you set the direction register but I have to write
LPC_GPIO0->DIR = 1 << 7;
don.t I?
Thanks
Takashi

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: Porting to LPC1114FN28

Postby Giovanni » Mon Aug 19, 2013 7:22 pm

Hi.

GPIO related code is in pal_lld.c and pal_lld.h. Exactly what are you trying to accomplish?

Giovanni


Return to “LPC Support”

Who is online

Users browsing this forum: No registered users and 11 guests