about libraries

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

about libraries

881 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Hyla on Thu Mar 15 07:43:58 MST 2012
Hi,

as an (eternal) beginner I am relying heavily on available examples.
I am using the Code Red compiler and have downloaded various demo sources for LPCXpresso 1343, 1114 and 1769.
For the latter I have examples that include and depend on a suite of periphery drivers that are named "lpc17xx_pinsel.c", "lpc17xx_ssp.c", "lpc17xx_gpio.c" and so on. Other sources use different periphery driver files, e.g. called "gpio.c" or "ssp.c". These two drivers sets are not compatible, it's either or.
Since both seem to have their origin at NXP:
What is the "correct" driver suite to use? Why are there two different versions? And the most interesting question: Where are the equivalent driver files for the two other chips I mentioned?
I've tried to find a file "lpc13xx_pinsel.c" for quite some time now without success ...
Could anybody please enlighten me here?

Thanks,

Christoph
0 Kudos
Reply
3 Replies

858 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri Mar 16 02:10:17 MST 2012

Quote:

...which version seems to You to be the most promising way to go on?

I like simple projects with included sources because I tend to change a lot things. So I can keep problems local without mutilating a general driver library :rolleyes:

Otherwise a general library is easy to use and a good point to start. But anyway, you don't want to waste too much time so just use whatever is working.


Quote:

On the other hand I have not been able to find "lpc13xx_" or "lpc11xx_" versions of the drivers.

AFAIK they can't be downloaded as package :(


Quote:

Do they exist at all?

Yes, they exist :) Some samples include them (in driver folder) like LPC11C24 sample:

http://ics.nxp.com/support/documents/microcontrollers/zip/lpcxpresso.examples.lpc11c24.zip   at   http://ics.nxp.com/support/lpcxpresso/#Examples


Quote:

If not - why?

That's a NXP question. Don't know why they don't add a download link :mad:

Note: You can also google around and try to find other libs like:

http://www.microbuilder.eu/Projects/LPC1343ReferenceDesign/LPC1343CodeBase.aspx

http://www.microbuilder.eu/Projects/LPC1114ReferenceDesign/LPC1114CodeBase.aspx
0 Kudos
Reply

858 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Hyla on Thu Mar 15 12:16:05 MST 2012
Thanks for Your answer, Zero.

Well, let me put it this way. My life on earth is somewhat limited, I'm nearing the fifties ;)
I cannot possibly learn all this from (no pun intended) zero. If I ever want to achieve something practical I'll have to use stuff like prefabricated libraries and there's nothing wrong in that.
What I'm interested in is simply: which version seems to You to be the most promising way to go on? The "lpc17xx_"-type device drivers seem to be newer than their counter parts that come with the Code Red distribution (?). And the code I've got that uses them is working well. On the other hand I have not been able to find "lpc13xx_" or "lpc11xx_" versions of the drivers. Which I would need to re-use my code with other chips.
Do they exist [I]at all[/I]? If not - why? :)



Quote: Zero

I would suggest to use examples in LPCXpresso/example folder. Unfortunately even they are often not up to date and has to be changed to CMSIS V2.00.


Ah. Well. I'm a great expert already in converting CMSIS V1.3 into CMSIS V2.0 projects ...

Quote: Zero
Also I would suggest to start with one MCU and get familiar with it (and LPCXpresso) before different registers of different chips confuse you :)


Well, once a certain level of confusion is reached it simply doesn't matter anymore.
Ignorance [I]is[/I] bliss, You know :)

Christoph
0 Kudos
Reply

858 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Mar 15 10:45:08 MST 2012

Quote:

What is the "correct" driver suite to use?

Use whatever you want, there's no black or white :rolleyes:

I would suggest to use examples in LPCXpresso/example folder. Unfortunately even they are often not up to date and has to be changed to CMSIS V2.00. So the best way is to use project wizard and start a new project (with actual CMSIS) and include source and header files you need.


Quote:

Why are there two different versions?

Because there's no version police and samples have been changed :(


Quote:

And the most interesting question: Where are the equivalent driver files for the two other chips I mentioned?

Since these chips have different registers there are different drivers for each chip. I don't know which chip you are using, but in general I would suggest to avoid these drivers for simple things like GPIO and write/read registers direct. Reading about this registers in UM will help you to understand how they work and which of them are used in different chips. Also I would suggest to start with one MCU and get familiar with it (and LPCXpresso) before different registers of different chips confuse you :)
0 Kudos
Reply