EmbeddedRelated.com
Forums
Memfault Beyond the Launch

General impressions of AT91SAM7 vs LPC21xx

Started by embeddedjanitor January 23, 2005


I started out on a USB slave project a year back using an LPC2106 +
an FTDI chip for the USB link. This was going to cost a bit (two
chips etc and the GPIO speed of the LPC21xx is quite slow which would
have been a problem. As it turned out I ran out of time through last
year, so restarted the project this year with an AT91SAM7S64 with
onboard USB.

I have not done much yet, but I can make these comments so far.

Stuff I like:
1) I like the GPIO speed. You can software-clock a square wave out of
a GPIO pin at more than twice the speed you can do it on an LPCxxx.
2) SPI can be run much faster (nice for my app).
3) I prefer being able to see my flash as flash, rather than through
a convoluted Philips ISP/IAP interface. Stuff I don't like:
1) The LPC21xx's MAM and super-wide flash make execution faster for
some code than an the SAM7. I am using the IAR workbench with JLink. The debugging is prety slick
most of the time though every now and then the GUI crashes. I will be
switching to gnu tools sometime soon (I prefer working with GNU and
Linux).

A few more USB examples would be a Good Thing.



Re: General impressions of AT91SAM7 vs LPC21xx
Re: General impressions of AT91SAM7 vs LPC21xx
Re: General impressions of AT91SAM7 vs LPC21xx
Re: General impressions of AT91SAM7 vs LPC21xx
Re: General impressions of AT91SAM7 vs LPC21xx
Re: General impressions of AT91SAM7 vs LPC21xx
Re: General impressions of AT91SAM7 vs LPC21xx


> A few more USB examples would be a Good Thing.

The USB peripheral is a bit quirky.

FreeRTOS includes a USB example that enumerates as a joystick. It is
not fully USB compliant and needs a bit of work - but is working and
can be used as a reference for setting up the peripheral.

See: http://www.freertos.org/portsam7iar.html

Regards.




> A few more USB examples would be a Good Thing.

[sorry if this double posts hassled] The USB device is a bit quirky.

The FreeRTOS.org download contains a sample USB driver that
enumerates as a joystick. It is not fully USB compliant and needs
some work, but can be used as a reference for configuration of the
peripheral.

See: http://www.freertos.org/portsam7iar.html

Regards.


Hi,
 
Put in my 2 cents worth, because I've become to __love__
SAM7 :
 
First of all, main reasons why my app works better on SAM7 :
1. It can accept an extrnal 4 MHz clock for PLL and/or core.
    LPC2K is min 10 MHz.
    Real estate is premium, and these are RF ISM modules with nRF905   
    on them, saving on an extra Xtal etc.
    The extra 15-18 uA blown on nRF905 for clock + UP_CLK is worth the
    "instant" startup from sleep.
2.  I need lots of INTs on GPIOs, for event processing/tasking.
     LPC2K does not have that.
3.  Flash, easy to work with like MSP430, and in nice little 128/256 bytes vectors, yippie.
 
The SPI I find heaven sent, able to change clock rate, setup/hold time and bus float
without re-executing this at runtime ! (8-16 bits rather nice too, dunno what for yet :-)
 
> 1) I like the GPIO speed. You can software-clock a square wave out of
> a GPIO pin at more than twice the speed you can do it on an LPCxxx.
And best of all, to get that speed, you needn't resort to things like setting VPDIV=1
on LPC2K, becoming a real current hog for increased I/O thruput !
SAM7 runs at surprisngly low current for many things.
 
> 2) SPI can be run much faster (nice for my app).
Yep, same here.
 
> 3) I prefer being able to see my flash as flash, rather than through
> a convoluted Philips ISP/IAP interface.
Bis.
I never got to using the IAP I/F and glad I didn't, I've seen nothing but
dramas about that.
The Flash Controller is easy as pie to work with.
 
> Stuff I don't like:
> 1) The LPC21xx's MAM and super-wide flash make execution faster for
> some code than an the SAM7.
I've found that if you try to stick to Thumb, many cases start to get near LPC2K
thruput. It heavily depends on C coding , but overall I find it a sort-of even toss,
at slightly less current.
ARM code doesn't do as well.
 
 
> I am using the IAR workbench with JLink. The debugging is prety slick
> most of the time though every now and then the GUI crashes. I will be
> switching to gnu tools sometime soon (I prefer working with GNU and
> Linux).
Grrr.
I tried the EWARM, and it indeed crashes here and there.
Plus, using my homebrew Wiggler (J-link works crap for me), it loads
woefully slow.
I use Rowley CrossWorks on MSP430, AVR and ARM, and - even with Flash -
it ___flies___ through the upload on SAM7S64.
Seems the McCraigor driver in IAR is really shite.
 
> A few more USB examples would be a Good Thing.
Definitely.
 
I have to start using a  CP2101 (with EK) form a client, and eventually it'd be
funky to "emulate" the CP2101 within the SAM7.
 
B rgds
Kris
 



Re: General impressions of AT91SAM7 vs LPC21xx


<snip>

> > A few more USB examples would be a Good Thing.
>
> Definitely.

[Ok, so this is my third attempt at posting this. Very sorry if you
can see all 3, I can't.] The USB device is a bit quirky.

The FreeRTOS.org download contains a sample USB driver that
enumerates as a joystick. It is not fully USB compliant and needs
some work, but can be used as a reference for configuration of the
peripheral.

See: http://www.freertos.org/portsam7iar.html

Regards.



I don't have positive opinion about this chips. I'm waiting for SAM7
kit (IAR) more than too long (well... since they started advertising it).
I also designed a demo board (mainly for USB use) but project is
collecting dust on my desk: no samples. With so much waiting I think
LPC2148 have more chance to win (I've got LPC2138 but no USB with this
one). I bet I'll get them before SAM7s.

What I don't like about SAM7 is how it handles SPI communication. It
seems that I can't toggle chip select manualy or did I miss something?
Datasheet doesn't state that user can override NPCS pins or any other
SPI pins (like in AVRs - that is very cool). How to read 32bit long
stream (which must not be interrupted by deselecting the chip)?

Anyway hard to tell for now, because in one hand I have LPC213x and in
the other I have nothing. I'll keep you informed about 'getting chips'
outcome.




Re: General impressions of AT91SAM7 vs LPC21xx
Hi,
 
> What I don't like about SAM7 is how it handles SPI communication. It
> seems that I can't toggle chip select manualy or did I miss something?
It's quite easy to manually select SPI Slaves.
Set and clear the GPIO pin of your choice as a /CS, and drive the SPI TX and RX.
You just need to make sure you initialize your PIOA_ registers properly.
(PIOA_PER , PIOA_PDR , PIOA_ODR , PIOA_OER , PIOA_ASR )
 
Then you set it as a Master, and init it for FIXED PCS0 operation, but just don't
enable the peripheral pin.....
 
I've used it that way to SPI EEPROM etc. works fine.
 
> Datasheet doesn't state that user can override NPCS pins  or any other
> SPI pins (like in AVRs - that is very cool).
 
Explained above, set it fixed PCS0, and don't enable the peripheral function.
Instead turn your chosen /CS LOW - HIGH as you please.
 
> How to read 32bit long
> stream (which must not be interrupted by deselecting the chip)?
Manually as above, or there are "markers" you can set that decide when
/CS for that bank is asserted and de-asserted (using PDC).
 
Don't understand, this SPI can do 10 times more than any other SPI I've come across ???
 
> Anyway hard to tell for now, because in one hand I have LPC213x and in
> the other I have nothing. I'll keep you informed about 'getting chips'
> outcome.
The AT91S-EK board seems OK to get, waiting for advice on samples...
 
B rgds
Kris
 




--- In , "slawcus" <slawcus@y...> wrote:
>
> I don't have positive opinion about this chips. I'm waiting for SAM7
> kit (IAR) more than too long (well... since they started advertising
it).

totally agree that the announcements of the SAM7 devices have been way
too early but I guess that was out of desperation when Atmel marketing
saw that they were a little late and Philips LPC2000 devices getting
all the attention.
Today that game is sort of different. While still more in sampling
than in volume production, the SAM7 devices (at least the S32) do
exist and are definitely interesting for many applications.

> I also designed a demo board (mainly for USB use) but project is
> collecting dust on my desk: no samples. With so much waiting I think
> LPC2148 have more chance to win (I've got LPC2138 but no USB with this
> one). I bet I'll get them before SAM7s.

Don't bet on that. While I am a LPC-fan, the presentations I saw from
Philips announce the USB device LPC2148 late in Q2, don't think that
Atmel will take that long but on the other hand the LPC2138 with an
external USB would do the job today if you need more than the 64k
Flash (e.g. 512k flash).

>
> What I don't like about SAM7 is how it handles SPI communication. It
> seems that I can't toggle chip select manualy or did I miss something?
> Datasheet doesn't state that user can override NPCS pins or any other
> SPI pins (like in AVRs - that is very cool). How to read 32bit long
> stream (which must not be interrupted by deselecting the chip)?
>
> Anyway hard to tell for now, because in one hand I have LPC213x and in
> the other I have nothing. I'll keep you informed about 'getting chips'
> outcome.




Memfault Beyond the Launch