Forums

Tiny ARM Development

Started by Alex McHale July 27, 2005
We are looking at using the AT91SAM7S64 in a new project. We had
previously tried the ATMEGA32, but it turned out to be underpowered for
our needs. The program, however, was less than 100 lines of assembly
code for the ATMEGA32.

The AT91 does not seem quite as easy to get into as the AVR. I have the
AT91SAM7S64-IAR development kit, and am having trouble figuring out
where to go next. Most of the resources I find are for C programming
and somewhat larger programs.

Essentially, the program will be outputting data over 10 output lines,
and needs an interrupt for listening for data to clock on another 8
input lines. That's it. It will all be ideally written in pure
assembly.

If anyone can point me to any resources related to small program
development for this processor, I would very much appreciate it. I am
currently using the IAR software that came with the development kit
with the JLink interface.

Thank you.

> The AT91 does not seem quite as easy to get into as the AVR. I have the > AT91SAM7S64-IAR development kit, and am having trouble figuring out > where to go next. Most of the resources I find are for C programming > and somewhat larger programs.
I can point you to a book I wrote, targeted at the AT91R40807 but the ideas are portable to almost any ARM. It does talk about C programming, but it starts with some simple all-assembly language examples (since it shows you how to write your own startup code). Toolchain used is GNU, of course. <http://www.amazon.com/exec/obidos/ASIN/0750676094/zws-20>
Thanks for the link to your book.  I'll be ordering a copy later today.

I suppose that the biggest stumbling block I'm facing, to start with,
is my inability to find the sort of documentation that I am used to for
this chip.  I've done extensive development with the AVR and Rabbit
processors, and both have excellent documentation of the sorts of
things like "Data Direction Register for I/O Port A is at memory
address XX," "Data Register for I/O Port A is at memory address XX,"
etc.  Merely reading and writing to I/O ports, which I'm just
*assuming* are available on the chip, is proving no readily documented
task.  I haven't even been able to find a detailed instruction set
list.

The power that this chip provides is what I need.  I don't need it to
run an operating system, run multiple threads, or any such business.
It simply needs to read ports when an external interrupt is triggered,
and output on other ports the rest of the time (with some memory used
as a cache in between these operations).

Thanks again.

Hi,

> etc. Merely reading and writing to I/O ports, which I'm just > *assuming* are available on the chip, is proving no readily documented > task. I haven't even been able to find a detailed instruction set > list.
All I/O is memory mapped, ARM does not have a separate I/O address space. While I haven't worked with the 91SAM series (yet) all this stuff was adequately documented for the 91R40* series parts. The instruction set documentation is published by ARM, not Atmel, but a copy can be found under AT91 ARM Thumb - Other Documents at <http://www.atmel.com/dyn/products/other_docs.asp?family_id=605> (ARM7TDMI Technical Reference Manual).
> It simply needs to read ports when an external interrupt is triggered, > and output on other ports the rest of the time (with some memory used > as a cache in between these operations).
This is an interesting sort of requirement. I'm not sure that ARM was necessarily the obvious choice here - its interrupt latency is not fantastic. Have you done actual metrics yet? Are you committed to a board layout, or are you experimenting on the EVB before starting the layout?

larwe@larwe.com wrote:
> Hi, > > > etc. Merely reading and writing to I/O ports, which I'm just > > *assuming* are available on the chip, is proving no readily documented > > task. I haven't even been able to find a detailed instruction set > > list. > > All I/O is memory mapped, ARM does not have a separate I/O address > space. While I haven't worked with the 91SAM series (yet) all this > stuff was adequately documented for the 91R40* series parts. > > The instruction set documentation is published by ARM, not Atmel, but a > copy can be found under AT91 ARM Thumb - Other Documents at > <http://www.atmel.com/dyn/products/other_docs.asp?family_id=605> > (ARM7TDMI Technical Reference Manual). > > > It simply needs to read ports when an external interrupt is triggered, > > and output on other ports the rest of the time (with some memory used > > as a cache in between these operations).
Sounds like hardware FIFOs.
> > This is an interesting sort of requirement. I'm not sure that ARM was > necessarily the obvious choice here
Depends on the ARM. AT91SAM7S64 (as quoted by OP) is approx. 30 MIPS vs. 20 MIPS for Atmega32. This is not a whole lot of performance gain. AT91RM9200 is 200 MIPS and might make a different. However, the cost is also higher.
> - its interrupt latency is not > fantastic. Have you done actual metrics yet? Are you committed to a > board layout, or are you experimenting on the EVB before starting the > layout?
alexmchale@gmail.com wrote:
> Thanks for the link to your book. I'll be ordering a copy later today. > > I suppose that the biggest stumbling block I'm facing, to start with, > is my inability to find the sort of documentation that I am used to for > this chip. I've done extensive development with the AVR and Rabbit > processors, and both have excellent documentation of the sorts of > things like "Data Direction Register for I/O Port A is at memory > address XX," "Data Register for I/O Port A is at memory address XX," > etc. Merely reading and writing to I/O ports, which I'm just > *assuming* are available on the chip, is proving no readily documented > task. I haven't even been able to find a detailed instruction set > list. > > The power that this chip provides is what I need. I don't need it to > run an operating system, run multiple threads, or any such business. > It simply needs to read ports when an external interrupt is triggered, > and output on other ports the rest of the time (with some memory used > as a cache in between these operations). >
Get the data sheets from Atmel Web site <http://www.atmel.com/dyn/products/product_card.asp?part_id=3521>. The AT91SAM7S64 data sheet is 519 pages with all the register addreses and bits described. For the processor core (ARM7TDMI), there is on the same page a link to the ARM7TDMI Technical Reference manual (284 pages). -- Tauno Voipio tauno voipio (at) iki fi
> Depends on the ARM. AT91SAM7S64 (as quoted by OP) is approx. 30 MIPS > vs. 20 MIPS for Atmega32. This is not a whole lot of performance gain. > AT91RM9200 is 200 MIPS and might make a different. However, the cost > is also higher.
MIPS - A meaningless comparison - one is an 8bit the other a 32bit, both with different instruction sets.