Project

General

Profile

Actions

Activating ARM9 with a working OS

Basic concept

Hardware


We will be using FRI-SMS 32-bit microcontroller based on AT91SAM9620 chip from ARM9 family. It has fast ROM and RAM memories and embedds Ethernet MAC, one USB Device Port, and a USB Host controller. It also integrates several standard peripherals, such as the USART, SPI, TWI, Timer
Counters, Synchronous Serial Controller, ADC and MultiMedia Card Interface.
More about microcontroller can be found in Manual

Software

For programming the device we will be using AT91 In-System programmer SAM-BA.
We will also use U-BOOT as a second-step bootloader.
Our operating system will be Linux, kernel version 2.6.27.

Additional hardware

For programming flash memory we need additional USB (A-B) cable.

For using the arm from our PC, we need RS232 cable, which is made from serial DB9 cable. We open the DB9 cable and connect only three signals(RX, TX and GND) with CRIMP according to RS232 cable plan

For our file-system we use SD card (and not SD-hc), which we previously format on PC with linux to ext3, and extract our Filesystem on it.

Installing OS

Concept

FRI-SMS is built, so it boots from integrated ROM memory. It looks for bootloader into serial flash memory, if it is found it loads into internal SDRAM. This first-step bootloader then sets SDRAM controller and loads second-step bootloader(U-BOOT) into external SDRAM end executes it.
Second-step bootloader takes care of other microcontroller settings and runs the OS.

If bootloader is not found in ROM it searches for bootloader thtrough USB interface and then through RS232 interface and waits there in loop.

Loading software into flash ROM memory

  • Installing SAM-BA
    After installing SAM-BA we have to set the drivers correctly. SAM-BA is based on setting connection throuogh COM port, so we have to install a driver which sets the PC, so it recognizes the USB as COM port. SAM-BA install includes a driver, but it does not work on x64
    based operating systems such as Windows Vista 64-bit and Windows 7 64-bit. Attached is a modified driver, so it works on those systems (tested on Windows 7).
With SAM-BA we establish a connection between PC and FRI-SMS, then we enable DataFlash on external flash memory.
  1. First we load second-step bootloader U-BOOT from address 0x8400 onward
  2. Next step is Linux OS kernel, which we load on address 0x42000
  3. Last step is first-step bootloader, which must be loaded last, because we can't load any more files after we load first step loader (at least until system restore)

Using the OS

Establishing connection

For connecting our PC to ARM console we use beforementioned RS232 cable.
Then we need a program for establishing serial connection. I used Minicom on Ubuntu Linux, in Windows we can use Putty.
The settings for connection should be as follows:
- speed 115.200 baud
- data bits: 8
- stop bits: 1
- parity: NO
- flow control: OFF

Updated by Vanč Levstik almost 14 years ago · 6 revisions