Required Resources - Atmel AT91 Series Application Note

Arm thumb microcontrollers
Hide thumbs Also See for AT91 Series:
Table of Contents

Advertisement

The DmaChannelFiq function is activated by the FIQ (vector address 0x1C), and copies r11 x 4 words from the <source>
to the <destination> if possible.
void DmaChannelFiq (void)
Begin
| Save used registers in the temporary buffer
| Save source and destination
| While (nb_packets > 0) and (nb_bytes >= PACKET_SIZE)
| | Update nb_bytes by subtracting PACKET_SIZE from it
| | *dest <- *src (multiple load and store 4 words with post increment)
| | Decrement nb_packets
| EndWhile
| If (nb_packets == 0) (i.e. All blocks transferred)
| Then
| | === Copy last bytes to copy (< 16) ===
| | *dest <- *src
| | If needed, load and store multiple 2 words with post increment
| | If needed, load and store 1 word with post increment
| | If needed, load and store 1 half-word with post increment
| | If needed, load and store 1 byte with post increment
| | Clear nb_bytes
| | Disable DMA (SPSR.F <- 0)
| Endif
| Restore src (if not INC_SRC)
| Restore destination (if not INC_DEST)
| Restore used registers
End

Required Resources

Table 6. DMA Turbo
Parameter
Code Size
Register Usage
Peripheral Usage
Table 7. DMA Channel
Parameter
Code Size
Register Usage
Peripheral Usage
AT91 Series
6
Value
20 words
R8 to R14 (banked FIQ
registers)
FIQ Interrupt
Value
51 words
R8 to R14 (banked FIQ
registers)
FIQ Interrupt

Advertisement

Table of Contents
loading

Table of Contents