Help 11u68 CMSIS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Help 11u68 CMSIS

579 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Seb.Bx on Thu Jul 24 06:07:55 MST 2014
Hello,

I am begginer as microcontroller programming so it may be a noob question.

I have been using the LP1769 board, and now I want to adapt my code to my own card who has the 11u68.
I am starting by lighting a LED on the port PIO2_19, but I can't access to the IOCON register of this port. The proposal stop at "LPC_IOCON->PIO1_9".
I am using the library CMSIS_CORE_LPC11Uxx downloaded here, but I see in the file LPC11Uxx.h that there is no declaration of ports PIO2_xx in the structure of LPC_IOCON.

I guess I have to download the CMSIS for the LPC11U6x, but I can't find it



This is what I did :
LPC_SYSCON->SYSAHBCLKCTRL |= 1 << 6;// Enable the clock to the GPIO

LPC_IOCON->
LPC_GPIO->DIR[2] |= 1 << 19;// P2_19 Direction as output
LPC_GPIO->SET[2] |= 1 << 19;// P2_19 Set to 1


Any help appreciated.
Labels (1)
0 Kudos
Reply
6 Replies

505 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Seb.Bx on Mon Jul 28 04:26:07 MST 2014
Everything works fine with the LPC11U6x.h and system_LPC11U6x.h from mbed.org.
Just replacing the LPC11Uxx.h from the CMSIS_CORE_LPC11Uxx with the new ones.
0 Kudos
Reply

505 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Seb.Bx on Thu Jul 24 11:53:53 MST 2014
Thanks for the reply.

I would have preferred to easily transpose my code by adapting the registers name (and some specific stuff), according to the user's manual which I followed to initialize GPIO, I2C, SPI etc.
I have found the file "LPC11U6x.h"  and "system_LPC11U6x.h" on http://mbed.org/. Perhaps I can transpose it in the "CMSIS_CORE_LPC11Uxx" project.
Otherwise I will do as you say, spending some time to understand how the functions of LPCOpen work. From what I have seen so far, I didn't see what files I will need to import to my personnal project to use the registers name like in LPCOpen's functions (such as :  pGPIO->DIR[port] |= 1UL << bit;). I think of something like "chip.h" and others.

Anyway, I will take a better look tomorrow ;)
0 Kudos
Reply

505 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nerd herd on Thu Jul 24 09:11:14 MST 2014
Hello,

Since you are moving from the LPC17xx to LPC11xx, the register names can change, like you have noticed. I know you don't want to use LPCOpen code and want to write everything yourself on the register level, but I would still take a look and see how the code works. All the examples will be wrapped in several user friendly API function calls, but if you dig deeper, you will see the register interaction. From there, you can learn the register names yourself.

Here is a link to LPCOpen software platform for the LPC11xx:
http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0

The user's manual is likely to be a great reference as well!
http://www.nxp.com/documents/user_manual/UM10732.pdf
0 Kudos
Reply

505 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Thu Jul 24 09:10:57 MST 2014
The LPCOpen headers define the registers. Of course, you could re-write them all yourself...
0 Kudos
Reply

505 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Seb.Bx on Thu Jul 24 07:41:06 MST 2014
Hello,
I have already taken a look at LPCOpen, but I don't really want to use it. I want to access directly the registers and doing my own functions.
The same way I did on the LPC1769.
0 Kudos
Reply

505 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Thu Jul 24 06:28:36 MST 2014
Use LPCOpen. It is a superset of CMSIS.
0 Kudos
Reply