CMSIS Documentation

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

CMSIS Documentation

2,834 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sferix on Tue Mar 15 12:28:09 MST 2011
Hi All

Where can I find documentation on the CMSISv1p30_LPC17xx  please ?

I have the "LPCXpresso LPC1769 Rev B" board and the "Code Red LPCXpresso IDE v3.6.2".  I have used the LPCXpresso1768.zip and have built, run and modified some of the example projects ok.

I'm new to NXP/Cortex (but have worked with many other micros) and I now want to build some projects from scratch and start using other peripherals on the LPC1769, hence I need documentation on the CMSIS.  Also I want to understand clock and power settings.  Any advice please ?
0 Kudos
Reply
10 Replies

2,571 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sferix on Thu Mar 17 13:16:26 MST 2011
Thanks guys for the links, they look helpful.  I'll go away and start reading.

Regards, sferix
0 Kudos
Reply

2,571 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JSalisbury on Thu Mar 17 03:09:10 MST 2011
Hi,
Does this link help http://ics.nxp.com/support/documents/microcontrollers/zip/lpc17xx.cmsis.driver.library.zip

and is there a similar file for the lpc11XX series?
0 Kudos
Reply

2,571 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sferix on Thu Mar 17 01:14:01 MST 2011
Thanks for your explanation piperazine, fits in with what I was expecting.

Have to say I'm underwhelmed by the quality of CMSIS documentation.

Regards, sferix

2,571 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by piperazine on Wed Mar 16 14:40:27 MST 2011
Hello,

First off I'm no expert, but here's my take on CMSIS:

core_cm3.c
core_cm3.h

These file contain the names, definitions, and helper functions to access the CORE registers, and CORE peripherals of the Cortex M3 chips, like functions for setting up the NVIC (Nested Vector Interrupt controller), Systick etc. These files are provided by ARM and I believe these are the same for any Cortex M3 chip. The documentation in the "docs" folder covers much of whats goin on in here.

Then you have the device specific files which are supplied by the silicon vendor (in this case NXP).

LPC17xx.h
This file contains the data structures, register memory addresses, and defines for the LPC17xx (peripherals like UART, GPIO, TIMERS, etc are all in here). All the registers from the LPC17XX user manual are in here somewhere.

system_LPC17xx.h
This file contains the prototypes for the SystemInit(), and SystemCoreClockUpdate(). CMSIS requires these two functions to be provided by the silicon vendor, as on chip peripherals (Clock setup, PLL setup, etc) will differ from chip to chip. SystemInit() is called from the startup code to setup the clock settings.

system_LPC17xx.c
This file contains the implementaion for SystemInit(), and SystemCoreClockUpdate(). Which again is device specific and supplied by the silcon vendor. It also contains a bunch of defines which allow you to easily change the clock speed settings.

As far as I know there isnt any supplementary documentation for the vendor supplied files (except the comments in the code). The way I tackled getting my head round this (from a beginners perspective) was to cross refernce the LCP1769 user manual with the LPC17xx.h file to get my bearings on the register locations, and how they are accessed. Then to study the Clocking and power control section (Chapter 4), and compare that to the defines set up in system_LPC17xx.c to get a grasp on clock settings.

Does that help?
0 Kudos
Reply

2,571 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sferix on Wed Mar 16 13:12:51 MST 2011
Hi

Thanks both for the feedback.  I'm having some trouble then understanding exactly what CMSIS is.

The OnArm site describes CMSIS as a "vendor-independent hardware abstraction layer" (HAL).  I'm not expecting drivers (I didn't mention that) but I had assumed from the HAL description, a set of unified definitions and methods/functions to access the hardware/peripherals (note function does not equal a driver).

The CMSIS_Core.htm describes the "Core Peripheral Access Layer" as "contains name definitions, address definitions and helper functions to access core registers and peripherals.", which is what I expected.

Also I note in the system_LPC17xx.c module of CMSISv1p30_LPC17xx there are a number functions defined.  One, SystemInit does appear to initialise the Clock Divider, Clock Source, PLL, Power Control etc.

So now I'm really confused as this seems to conflict with the information you guys have given.  Can you clarify exactly what you meant and what CMSIS does provide ?

I was hoping there would be some documentation of the CMSISv1p30_LPC17xx, that would straighten this out for me.  I'm sort of getting the message that there isn't any and I have to go routing around in examples to find out how to use it.  I was hoping for something a bit more productive.  Is that as good as it gets ?

Sorry to be pedantic, but I wan't to get the most out of this and don't wan't to misunderstand you.

Regards, sferix
0 Kudos
Reply

2,571 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Mar 16 09:07:51 MST 2011
As [I]igorsk[/I] says, CMSIS does not provide peripheral drivers itself - it basically provides some setup code and headers that provide a way to access the peripheral registers themselves.

Some example code and driver libraries do have the word CMSIS in their titles though, which may be where your confusion arises. This simply refers to the fact that the code has been written to use the CMSIS way of accessing the peripherals. Typically this has been done because earler versions of the code used pre-CMSIS header files (this particularly applies to LPC17xx).

Hope this helps to clarify things a little.

I would suggest that your next step after playing with the examples in the LPCXpresso1768.zip would be to import some of the other examples provided in the LPC1700 examples subdirectory and take at look at these. You might find the below FAQ of use in doing this...

http://support.code-red-tech.com/CodeRedWiki/SuppliedExamples

Regards,
CodeRedSupport
0 Kudos
Reply

2,571 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by igorsk on Wed Mar 16 07:47:07 MST 2011
CMSIS does not define high-level functions for peripherals, or the chip-specific initialization.
0 Kudos
Reply

2,571 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sferix on Wed Mar 16 01:53:43 MST 2011
Hi

Thanks for the feedback, but I must be missing something.  I have already been to

http://support.code-red-tech.com/Cod.../Support4CMSIS

and it only covers a very basic description of CMSIS as far as I can see.  You also mention

" The general documentation for CMSIS itself can be found in the docs subdirectory of the CMSIS library project. "

I'm not quite sure where you are pointing me, but I can't find any documentation of the type I'm expecting on Support4CMSIS.  Also I have been to the OnArm site, but can only find docs on CMSIS 2 not CMSISv1p30_LPC17xx.

What I am needing is the documentation on the CMSIS function calls that, for example, set up and use the gpio, timer counter, uart, etc.  Also I want to find out how CMSIS configures the processor at start up, e.g. clock and power settings.  I am assuming there is some documentation on CMSISv1p30_LPC17xx that covers that.  Where can I find that documentation please ?

Regards, sferix
0 Kudos
Reply

2,571 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Mar 16 00:04:36 MST 2011
Information on using the CMSIS library project supplied with LPCXpresso can be found here:

http://support.code-red-tech.com/CodeRedWiki/Support4CMSIS

The general documentation for CMSIS itself can be found in the docs subdirectory of the CMSIS library project.

Regards,
CodeRedSupport
0 Kudos
Reply