> I have been using LPC21 an LPC23 devices. Especially
the ones that have
> small footprint with large flash, ex: LPC2148. NXP's new lpc13xx and
lpc17xx
> headers are designed wrt CMSIS. This is a little annoying if you want to
> port LPC21xx code to LPC1xxx. I'll do it however I want my code to be
> portable..
>
I went in the opposite direction ... I found the CMSIS headers rather annoying
compared to what I'm used to and made my own LPC1343/1114 headers without
all the X->Y madness ... I prefer simple register names, and no 'magic
numbers', so I ended up redoing everything to end up with code like
this:
/* 8 bits, no Parity, 1 Stop bit */
UART_U0LCR = (UART_U0LCR_Word_Length_Select_8Chars |
UART_U0LCR_Stop_Bit_Select_1Bits |
UART_U0LCR_Parity_Disabled |
UART_U0LCR_Parity_Select_OddParity |
UART_U0LCR_Break_Control_Disabled |
UART_U0LCR_Divisor_Latch_Access_Enabled);
It was about a week of work, all told, but it's definately nice to have
consistently structured code between projects. CMSIS is great in that it
standardises the ISRs, etc., and takes a lot of the burden away on getting the
device up and running ... I just wish it didn't force a specific structure
on you for the main device header file.
To answer your question, though, I suspect if you want something similar for the
2100 you'll have to do it yourself ... though I believe some toolchains
provide header files with a similar structure ... but you'll likely still
need to make some changes yourself.
Re: CMSIS and LPC21
Started by ●January 23, 2010