at91rm3400 ATMEL Corporation, at91rm3400 Datasheet - Page 52

no-image

at91rm3400

Manufacturer Part Number
at91rm3400
Description
Atmel Advanced At91 Arm Microcontroller
Manufacturer
ATMEL Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
at91rm3400-AU-002
Manufacturer:
Atmel
Quantity:
10 000
Boot Uploader
External
Communication
Channels
DBGU Serial Port
Xmodem Protocol
52
AT91RM3400
If no valid boot device has been found during the Bootloader sequence, initialization of serial
communication devices (DBGU and USB device ports) is performed.
The boot Uploader performs the DFU and Xmodem protocols to upload the application into
internal SRAM at address 0x0020_0000.
The Boot Program uses a piece of internal SRAM for variables and stacks. To prevent any
upload error, the size of the application to upload must be less than the SRAM size minus 3K
bytes.
After the download, the peripheral registers are reset, the interrupts are disabled and the
remap is performed. After the remap, the internal SRAM is at address 0x0000_0000 and the
internal ROM at address 0x0010_0000. The instruction setting the PC to 0 is the one just after
the remap command. This instruction is fetched in the pipe before doing the remap and exe-
cuted just after. This fetch cycle executes the downloaded image.
The upload is performed through the DBGU serial port initialized to 115200 Baud, 8, n, 1.
The DBGU sends the character ‘C’ (0x43) to start an Xmodem protocol. Any terminal perform-
ing this protocol can be used to send the application file to the target. The size of the binary file
to send depends on the SRAM size embedded in the product (Refer to the microcontroller
datasheet to determine SRAM size embedded in the microcontroller). In all cases, the size of
the binary file must be lower than SRAM size because the Xmodem protocol requires some
SRAM memory to work.
The Xmodem protocol supported is the 128-byte length block. This protocol uses a two char-
acter CRC-16 to guarantee detection of a maximum bit error.
Xmodem protocol with CRC is accurate provided both sender and receiver report successful
transmission. Each block of the transfer looks like:
<SOH><blk #><255-blk #><--128 data bytes--><checksum> in which:
Figure 17 shows a transmission using this protocol.
Initialization of the DBGU serial port (115200 bauds, 8, N, 1) and Xmodem protocol
start
Initialization of the USB Device Port and DFU protocol start
Download of the application
<SOH> = 01 hex
<blk #> = binary number, starts at 01, increments by 1, and wraps 0FFH to 00H
(not to 01)
<255-blk #> = 1’s complement of the blk#.
<checksum> = 2 bytes CRC16
1790A–ATARM–11/03

Related parts for at91rm3400