Download Print this page

Espressif ESP32 Technical Reference Manual page 124

Hide thumbs Also See for ESP32:

Advertisement

6 DMA Controller (DMA)
Figure
6-3
shows the data transfer in UDMA mode. Before the DMA Engine receives data, software must initialize
the receive-linked-list. UHCI_INLINK_ADDR is used to point to the first in_link descriptor. The register must be
programmed with the lower 20 bits of the address of the initial linked-list item. After UHCI_INLINK_START is
set, the Universal Host Controller Interface (UHCI) will transmit the data received by UART to the Decoder. After
being parsed, the data will be stored in the RAM as specified by the receive-linked-list descriptor.
Before DMA transmits data, software must initialize the transmit-linked-list and the data to be transferred. UHCI_
OUTLINK_ADDR is used to point to the first out_link descriptor. The register must be programmed with the lower
20 bits of the address of the initial transmit-linked-list item. After UHCI_OUTLINK_START is set, the DMA Engine
will read data from the RAM location specified by the linked-list descriptor and then transfer the data through
the Encoder. The DMA Engine will then shift the data out serially through the UART transmitter.
The UART DMA follows a format of (separator + data + separator). The Encoder is used for adding separa-
tors before and after data, as well as using special-character sequences to replace data that are the same
as separators. The Decoder is used for removing separators before and after data, as well as replacing the
special-character sequences with separators. There can be multiple consecutive separators marking the be-
ginning or end of data. These separators can be configured through UHCI_SEPER_CH, with the default val-
ues being 0xC0. Data that are the same as separators can be replaced with UHCI_ESC_SEQ0_CHAR0 (0xDB
by default) and UHCI_ESC_SEQ0_CHAR1 (0xDD by default). After the transmission process is complete, a
UHCI_OUT_TOTAL_EOF_INT interrupt will be generated. After the reception procedure is complete, a UHCI_IN_
SUC_EOF_INT interrupt will be generated.
Note:
Please note that the buffer address pointer field in in_link descriptors should be word-aligned, and the size field in the
last in_link descriptor should be at least 4 bytes larger than the length of received data.
Espressif Systems
Figure 6-3. Data Transfer in UDMA Mode
124
Submit Documentation Feedback
ESP32 TRM (Version 5.2)

Advertisement

loading
Need help?

Need help?

Do you have a question about the ESP32 and is the answer not in the manual?