|
RM0316 Datasheet, PDF (268/1141 Pages) STMicroelectronics – This reference manual targets application developers | |||
|
◁ |
Direct memory access controller (DMA)
RM0316
Table 75. Programmable data width & endian behavior (when bits PINC = MINC = 1) (continued)
Source
port
width
Destination
port width
Number
of data
items to
transfer
(NDT)
Source content:
address / data
Transfer operations
Destination
content:
address / data
32
8
32
16
32
32
@0x0 / B3B2B1B0 1: READ B3B2B1B0[31:0] @0x0 then WRITE B0[7:0] @0x0
4
@0x4 / B7B6B5B4 2: READ B7B6B5B4[31:0] @0x4 then WRITE B4[7:0] @0x1
@0x8 / BBBAB9B8 3: READ BBBAB9B8[31:0] @0x8 then WRITE B8[7:0] @0x2
@0xC / BFBEBDBC 4: READ BFBEBDBC[31:0] @0xC then WRITE BC[7:0] @0x3
@0x0 / B0
@0x1 / B4
@0x2 / B8
@0x3 / BC
@0x0 / B3B2B1B0 1: READ B3B2B1B0[31:0] @0x0 then WRITE B1B0[7:0] @0x0
4
@0x4 / B7B6B5B4 2: READ B7B6B5B4[31:0] @0x4 then WRITE B5B4[7:0] @0x1
@0x8 / BBBAB9B8 3: READ BBBAB9B8[31:0] @0x8 then WRITE B9B8[7:0] @0x2
@0xC / BFBEBDBC 4: READ BFBEBDBC[31:0] @0xC then WRITE BDBC[7:0] @0x3
@0x0 / B1B0
@0x2 / B5B4
@0x4 / B9B8
@0x6 / BDBC
@0x0 / B3B2B1B0 1: READ B3B2B1B0[31:0] @0x0 then WRITE B3B2B1B0[31:0] @0x0 @0x0 / B3B2B1B0
4
@0x4 / B7B6B5B4 2: READ B7B6B5B4[31:0] @0x4 then WRITE B7B6B5B4[31:0] @0x4 @0x4 / B7B6B5B4
@0x8 / BBBAB9B8 3: READ BBBAB9B8[31:0] @0x8 then WRITE BBBAB9B8[31:0] @0x8 @0x8 / BBBAB9B8
@0xC / BFBEBDBC 4: READ BFBEBDBC[31:0] @0xC then WRITE BFBEBDBC[31:0] @0xC @0xC / BFBEBDBC
13.4.5
Addressing an AHB peripheral that does not support byte or halfword
write operations
When the DMA initiates an AHB byte or halfword write operation, the data are duplicated on
the unused lanes of the HWDATA[31:0] bus. So when the used AHB slave peripheral does
not support byte or halfword write operations (when HSIZE is not used by the peripheral)
and does not generate any error, the DMA writes the 32 HWDATA bits as shown in the two
examples below:
⢠To write the halfword â0xABCDâ, the DMA sets the HWDATA bus to â0xABCDABCDâ
with HSIZE = HalfWord
⢠To write the byte â0xABâ, the DMA sets the HWDATA bus to â0xABABABABâ with
HSIZE = Byte
Assuming that the AHB/APB bridge is an AHB 32-bit slave peripheral that does not take the
HSIZE data into account, it will transform any AHB byte or halfword operation into a 32-bit
APB operation in the following manner:
⢠an AHB byte write operation of the data â0xB0â to 0x0 (or to 0x1, 0x2 or 0x3) will be
converted to an APB word write operation of the data â0xB0B0B0B0â to 0x0
⢠an AHB halfword write operation of the data â0xB1B0â to 0x0 (or to 0x2) will be
converted to an APB word write operation of the data â0xB1B0B1B0â to 0x0
For instance, if you want to write the APB backup registers (16-bit registers aligned to a 32-
bit address boundary), you must configure the memory source size (MSIZE) to â16-bitâ and
the peripheral destination size (PSIZE) to â32-bitâ.
Error management
A DMA transfer error can be generated by reading from or writing to a reserved address
space. When a DMA transfer error occurs during a DMA read or a write access, the faulty
channel is automatically disabled through a hardware clear of its EN bit in the corresponding
Channel configuration register (DMA_CCRx). The channel's transfer error interrupt flag
(TEIF) in the DMA_IFR register is set and an interrupt is generated if the transfer error
interrupt enable bit (TEIE) in the DMA_CCRx register is set.
268/1141
DocID022558 Rev 5
|
▷ |