13
AT91FR4081
1386CATARM02/02
AT91 Flash
Uploader Software
All Flash-based AT91 devices are delivered with a pre-programmed software called the AT91
Flash Uploader, which resides in the first sector of the embedded Flash. The Flash Uploader
allows programming to the embedded flash through a serial port. Either of the on-chip
USARTs can be used by the Flash Uploader.
Figure 3. Flash Uploader
Flash Uploader
Operations
The Flash Uploader requires NCS0 to be connected to NCSF and a valid clock to be applied
to MCKI. The chip select line loop allows the ARM Core to boot from the embedded Flash
when the reset is de-asserted. Next, the Flash Uploader immediately recopies itself in the
internal SRAM and jumps into it. The following operation requires this memory resource only.
External accesses are performed only to program the Flash.
When starting, PIO input change interrupts are initialized on the RXD lines of both USARTs.
When an interrupt occurs, a Timer Counter channel is started. When the next input change is
detected on the RXD line, the Timer Counter channel is stopped. This is how the first charac-
ter length is measured and the USART can be initiated by taking into account the ratio
between the device master clock speed and the actual communication baud rate speed.
The Programming System, then, can send commands and data following a proprietary proto-
col for the Flash device to be programmed. It is up to the Programming System to erase and
program the first sector of the Flash lastly, in order to reduce, at a minimum, the risk that the
Flash Uploader is erased and the power supply shuts down.
In the event that the Flash Uploader is erased from the first sector while the new final applica-
tion is not yet programmed, and while the target system power supply is switched off, it would
lead to a non-recoverable error and the AT91FR4081 could not be re-programmed by using
the Flash Uploader.
Programming System Atmel provides a free Host Loader that runs on an IBM compatible PC under Windows
®
95 or
Windows
®
98 operating system. It can be downloaded from the Atmel web site and requires
only a serial cable to connect the Host to the Target.
AT91M40800
USART0
USART1
Embedded
Flash
AT91F40816
Target System
NCSF
NCS0
Programming System
Serial
Port
RS232
Driver
14
AT91FR4081
1386CATARM02/02
Communications can be selected on either COM1 or COM2 and the serial link speed is limited
to 115200 bauds. Because the serial link is the bottleneck in this configuration, the Flash pro-
gramming lasts 110 seconds per Mbyte.
Programming time can be reached by using a faster programming system. An EB40 (AT91
Evaluation Board for the x40 Series Microcontroller) is capable of running a serial link at up to
500 Kbits/sec and can match the fastest programming allowed by the Flash, for example,
about 40 seconds per Mbyte when the word programming becomes the bottleneck.
Peripherals The AT91FR4081 peripherals are connected to the 32-bit wide Advanced Peripheral Bus.
Peripheral registers are only word accessible. Byte and half-word accesses are not supported.
If a byte or a half-word access is attempted, the memory controller automatically masks the
lowest address bits and generates a word access.
Each peripheral has a 16-Kbyte address space allocated (the AIC only has a 4-Kbyte address
space).
Peripheral Registers The following registers are common to all peripherals:
Control Register write only register that triggers a command when a one is written to the
corresponding position at the appropriate address. Writing a zero has no effect.
Mode Register read/write register that defines the configuration of the peripheral. Usually
has a value of 0x0 after a reset.
Data Registers read and/or write register that enables the exchange of data between the
processor and the peripheral.
Status Register read only register that returns the status of the peripheral.
Enable/Disable/Status Registers are shadow command registers. Writing a one in the
Enable Register sets the corresponding bit in the Status Register. Writing a one in the
Disable Register resets the corresponding bit and the result can be read in the Status
Register. Writing a bit to zero has no effect. This register access method maximizes the
efficiency of bit manipulation, and enables modification of a register with a single non-
interruptible instruction, replacing the costly read-modify-write operation.
Unused bits in the peripheral registers must be written at 0 for upward compatibility. These bits
read 0.
Peripheral Interrupt
Control
The Interrupt Control of each peripheral is controlled from the status register using the inter-
rupt mask. The status register bits are ANDed to their corresponding interrupt mask bits and
the result is then ORed to generate the Interrupt Source signal to the Advanced Interrupt
Controller.
The interrupt mask is read in the Interrupt Mask Register and is modified with the Interrupt
Enable Register and the Interrupt Disable Register. The enable/disable/status (or mask)
makes it possible to enable or disable peripheral interrupt sources with a non-interruptible sin-
gle instruction. This eliminates the need for interrupt masking at the AIC or Core level in real-
time and multi-tasking systems.
Peripheral Data
Controller
The AT91FR4081 has a 4-channel PDC dedicated to the two on-chip USARTs. One PDC
channel is dedicated to the receiver and one to the transmitter of each USART.
The user interface of a PDC channel is integrated in the memory space of each USART. It
contains a 32-bit Address Pointer Register (RPR or TPR) and a 16-bit Transfer Counter Reg-
ister (RCR or TCR). When the programmed number of transfers are performed, a status bit
indicating the end of transfer is set in the USART Status Register and an interrupt can be
generated.
15
AT91FR4081
1386CATARM02/02
System
Peripherals
PS: Power-saving The Power-saving feature optimizes power consumption, enabling the software to stop the
ARM7TDMI clock (idle mode), restarting it when the module receives an interrupt (or reset). It
also enables on-chip peripheral clocks to be enabled and disabled individually, matching
power consumption and application needs.
AIC: Advanced
Interrupt Controller
The Advanced Interrupt Controller has an 8-level priority, individually maskable, vectored
interrupt controller, and drives the NIRQ and NFIQ pins of the ARM7TDMI from:
The external fast interrupt line (FIQ)
The three external interrupt request lines (IRQ0 - IRQ2)
The interrupt signals from the on-chip peripherals
The AIC is extensively programmable offering maximum flexibility, and its vectoring features
reduce the real-time overhead in handling interrupts.
The AIC also features a spurious vector detection feature, which reduces spurious interrupt
handling to a minimum, and a protect mode that facilitates the debug capabilities.
PIO: Parallel I/O
Controller
The AT91FR4081 has 32 programmable I/O lines. Six pins are dedicated as general-purpose
I/O pins. Other I/O lines are multiplexed with an external signal of a peripheral to optimize the
use of available package pins. The PIO controller enables generation of an interrupt on input
change and insertion of a simple input glitch filter on any of the PIO pins.
WD: Watchdog The Watchdog is built around a 16-bit counter and is used to prevent system lock-up if the
software becomes trapped in a deadlock. It can generate an internal reset or interrupt, or
assert an active level on the dedicated pin NWDOVF. All programming registers are pass-
word-protected to prevent unintentional programming.
SF: Special Function The AT91FR4081 provides registers that implement the following special functions.
Chip Identification
RESET Status
Protect Mode

AT91FR4081-33CI

Mfr. #:
Manufacturer:
Description:
IC MCU 16/32BIT 1MB FLASH 120BGA AT91
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet