Home    Bloggers    Messages    Resources
Tw  |  Fb  |  In  |  Rss
Fuse Bits

Embracing the ARM M0: Peripherals

Duane Benson
Newest First   Oldest First   Threaded View
Page 1 / 2   >   >>
vish2207
vish2207
12/31/2012 12:24:00 AM
User Rank
Program Manager
Re: Simp-life-y
Agreed Duane, I had initially worked on PIC16 and PIC18 but it didn't had peripheral library support. But eventually I moved to dsPIC33 and PIC24 both had a library support and it really made my life easier. I think every mid range and high range MCUs should come with library support.

50%
50%
duanebenson
duanebenson
12/29/2012 11:58:07 AM
User Rank
Blogger
Re: Simp-life-y
Circuitman, JK, Vish - CMSI, if nothing else, takes care of all of the start-up intitialization.That initialization and start-up code was no small source of intimidation for me. My guess is that, even with good documentation, I'd still be struggling to get some code working if I didn't have access to CMSIS.

Ther peripheral library may not be CMSIS, but it's been pretty helpful too. I'm closer to being able to get by without the librabry than I am without CMSIS, but I'm up and running a lot faster. Over time, I'll get a better understanding of how it all works at the chip and register level and will be able to tweak as I see fit, but for now, both are very powerful and helpful.

50%
50%
duanebenson
duanebenson
12/29/2012 11:52:14 AM
User Rank
Blogger
Re: Simp-life-y
Vish - The NXP peripheral library is different that the Microchip library. First, Microchip doesn't provide it for all of it's MCUs. The 16F and lower parts don't come with the library. For the 18F parts, the library functions seen a little more integrated and were easier to start using than do the NXP library functions, but that may in part be due to my familiarity with Microchip parts. For the peripherals I've used on the NXP chip, the libraries do go a long ways toward making life easier.

50%
50%
duanebenson
duanebenson
12/29/2012 11:47:55 AM
User Rank
Blogger
Re: Simp-life-y
JK - As far as I can tell, it looks like I'll be able to re-compile my code with few changes aside from the MCU type setting. I haven't verified that yet, but it looks that way.

If that's the case, I'll be saved a lot of trouble. But I can certainly see how it cold get me into trouble. In fact, I have the MCU setting change a few times on me when I was first learning the LPCXpresso IDE. I'm not sure what I was doing, but whatever it was, it caused no small measure of frustration. Whatever the cause, I seem to have stopped doing it because I haven't had the issue in a while now.

50%
50%
circuitman
circuitman
12/25/2012 8:01:33 AM
User Rank
System supervisor
Re: Simp-life-y
@JK, I wouldn't call CMSIS an abstraction layer, because, AFAIK it is there written only for the ARM core and not for the peripherals. Since the core is the same among different vendors (almost), it does not add any extra layer of code.

@Duane, Most common place where CMSIS is used is when accessing low level registers (core & peripherals) and while writing interrupt handlers. Every other thing is vendor provided and does not support changing vendors.

Whether it helps changing MCU vendor or not i could say that CMSIS helps changing the development toolchain an easier task (assuming that the MCU remains the same between toolchains). This is quite frequent in the ARM world, because no other architecture has got as many different toolchains as ARM has.

 

50%
50%
jkvasan
jkvasan
12/25/2012 5:52:26 AM
User Rank
Blogger
Re: Simp-life-y
@Vish I guess it applies to all cortex family. Hence to NXP too. If the code is CMSIS compliant, as per ARM website, it applies to any ARM controller - vendor independent. Software reuse is the key goal. This means the learning curve could be much shorter.

50%
50%
vish2207
vish2207
12/25/2012 4:27:03 AM
User Rank
Program Manager
Re: Simp-life-y
@JK, is this in reference to NXP only or the CMSIS?

50%
50%
jkvasan
jkvasan
12/25/2012 4:20:36 AM
User Rank
Blogger
Re: Simp-life-y
@vish,

From what is provided in the web page, I guess this whole exercise is to have peripheral drivers for each of the peripherals across the range of mcus under the core. Probably, it may take a while for someone to integrate these libraries into the workspace and calling the relevant functions, APIS, etc - the first time. Then, it is always easy. I guess, this is what the Hardware Abstraction Layer is all about.

50%
50%
vish2207
vish2207
12/25/2012 4:10:29 AM
User Rank
Program Manager
Re: Simp-life-y
@DB, does NXP provides the peripheral library for ARMs same as Microchip provides? For me it is the great help in trying out things quickly. I can set-up things quickly and get going.

50%
50%
jkvasan
jkvasan
12/24/2012 7:53:28 PM
User Rank
Blogger
Re: Simp-life-y
DB, Using a ready made library can make life easier only when one gets a grip of what is happening or at least empowered with an understanding of the functions involved. A similar experience happened to me a year back. I used the RPDL library of RX62N from Renesas in a project. I would say it was almost plain English written in C. I tested my code with the starter kit and everything worked fine. Actually RPDL library has a DOS batch file to generate package specific code. The starter kit used a ball grid array package of 176 pins. My actual design used a 144 pin device LQFP. So I ventured on to generate my own RPDL code for this package only to find it was not working. My efforts to contact Renesas went in vain. They also didn't respond immediately. My own over-precautionary measures saved me. When I used the 176 pin device, I had actually used peripherals and pins common to both the 176 and 144 pins. So my original code compiled for 176 worked for 144 as well. However, the blessing in disguise was what is true for a higher end device was also working in 144 and the scalability factor was amazing. This experience makes me jittery when I start using such abstraction layers.

50%
50%
Page 1 / 2   >   >>
More Blogs from Fuse Bits
Open-source software provides some key elements for Duane's robot design.
Duane Benson takes yet another tack in his search for wireless control of his robot avatar.
When the Arduino ran out of steam, Duane looked to the mbed for his robot avatar's web server.
Duane launches an experiment to demonstrate the utility of mappable IO pins on an MCU.
There are some mistakes that you wonder how you made -- like leaving out an important part of the design.
flash poll
MC on twitter
like us on facebook
Microcontroller Central    About Us     Contact Us     Help     Register     Twitter     Facebook     RSS