dma
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dma [2025/04/16 01:31] – arisotura | dma [2025/04/20 19:10] (current) – arisotura | ||
|---|---|---|---|
| Line 33: | Line 33: | ||
| ^ Bits ^ Desc. ^ | ^ Bits ^ Desc. ^ | ||
| | 0 | DMA enable | | | 0 | DMA enable | | ||
| - | | 2-7 | ?? maybe affects | + | | 2-7 | DMA memory priority? | |
| | 15 | ?? no observed effect | | | 15 | ?? no observed effect | | ||
| + | |||
| + | Bit 0 seems to also control framebuffer transfer to the LCD? When it is cleared, the screen stops refreshing. | ||
| Bit 1 is set by the bootloader, but it doesn' | Bit 1 is set by the bootloader, but it doesn' | ||
| - | Bit 2-7 are set to zero. Not clear what their effect | + | Bit 2-7 are set to zero. They probably affect the priority of DMA relative to the CPU and other devices that access RAM. 0 is the fastest setting for DMA. 63 is the slowest, making |
| Bit 15 is set by the firmware but not the bootloader. | Bit 15 is set by the firmware but not the bootloader. | ||
| Line 77: | Line 79: | ||
| | 1-3 | Peripheral select | | | 1-3 | Peripheral select | | ||
| - | The peripheral select determines which peripheral is accessed. | + | The peripheral select determines which peripheral is accessed. |
| ^ Value ^ Desc. ^ | ^ Value ^ Desc. ^ | ||
| | 0 | ?? | | | 0 | ?? | | ||
| + | | 1 | ?? | | ||
| | 2 | SPI | | | 2 | SPI | | ||
| | 3 | ?? | | | 3 | ?? | | ||
| - | | 4 | + | | 4 |
| - | | 6 | + | | 5 | UART1 | |
| + | | 6 | ||
| + | | 7 | ?? | | ||
| + | |||
| + | Values 0, 2, 3, 4, 6 occur in the stock firmware. | ||
| Note that the peripheral must be configured correctly for the DMA transfer to work, ie. for SPI, the transfer direction in 0xF0004404 must match that of the DMA channel, and so on. | Note that the peripheral must be configured correctly for the DMA transfer to work, ie. for SPI, the transfer direction in 0xF0004404 must match that of the DMA channel, and so on. | ||
| Line 136: | Line 143: | ||
| | 0x20 | Fill value 1 | | | 0x20 | Fill value 1 | | ||
| | 0x24 | Fill value 2 | | | 0x24 | Fill value 2 | | ||
| - | | 0x28 | + | | 0x28 |
| - | | 0x2C | + | | 0x2C |
| Line 166: | Line 173: | ||
| | 9 | Bit order for masked fill mode; 0=MSb first, 1=LSb first | | | 9 | Bit order for masked fill mode; 0=MSb first, 1=LSb first | | ||
| | 10 | Simple fill mode (has priority over bit 7) | | | 10 | Simple fill mode (has priority over bit 7) | | ||
| - | | 11 | ??? | | + | | 16-17 | N value for bit 18; 0=1 byte, 1=2 bytes, 2=4 bytes, |
| - | | 16-17 | N value for bit 18; 0=1 byte, 1=2 bytes, 2=4 bytes, | + | | 18 | Skip every other N source bytes | |
| - | | 18 | Skip every N other source bytes | | + | | 19 |
| - | | 19 | + | | 20 |
| - | | 20 | + | |
| The logic operator bits specify how the source and destination data are combined. The following operators exist: | The logic operator bits specify how the source and destination data are combined. The following operators exist: | ||
| Line 200: | Line 206: | ||
| Not yet known if there is a way to do a masked copy. | Not yet known if there is a way to do a masked copy. | ||
| - | When bit 18 is set, twice as much source data is read. | + | When bit 18 is set, twice as much source data is read. This bit also applies in masked fill mode. |
| + | |||
| + | Bits 19 and 20 allow to apply fixed offsets to the source and destination addresses. | ||
| Line 270: | Line 278: | ||
| **Base+0x28** | **Base+0x28** | ||
| + | |||
| + | Positive memory offset. When bit 19 of the control register are set, this offset is added to the source address. When bit 20 is set, this offset is added to the destination address. | ||
| + | |||
| + | Mask is 0x3FFFF0, thus the offset is expressed in 16-byte units. | ||
| + | |||
| + | Not sure what the intended use of this register is, or if there' | ||
| + | |||
| **Base+0x2C** | **Base+0x2C** | ||
| - | Unknown. Mask is 0x003FFFF0. Might be a memory address? (for what?) | + | Negative memory offset. Same function as base+0x28, except this offset |
dma.1744767070.txt.gz · Last modified: 2025/04/16 01:31 by arisotura
