- Purpose
- This example demonstrates how to use DMAC to implement USART peripherals function in serial mode.
- Requirements
- This package can be used with all SAM-EK with UART/USART and DMAC.
- Description
On start up, the debug information is dumped to on-board UART port. A terminal application, such as HyperTerminal, is used to monitor these debug information. Open another HyperTerminal to connect with on-board USART port. Then the program works in ECHO mode, so USART will send back anything it receives from the HyperTerminal. You can send a text file from the HyperTerminal connected with USART port to the device (without any protocol such as X-modem).
- Note
- The text file size must be equal to BUFFER_SIZE(32 bytes in this example).
- Usage
- Build the program and download it into the evaluation boards.
- Connect a serial cable to the UART port for the evaluation kit.
- On the computer, open and configure a terminal application (e.g., HyperTerminal on Microsoft Windows) with these settings:
- 115200 bauds
- 8 bits of data
- No parity
- 1 stop bit
- No flow control
- In the terminal window, the following text should appear:
-- USART DMAC Example --
-- xxxxxx-xx
-- Compiled: xxx xx xxxx xx:xx:xx --
- Send a file in text format from the HyperTerminal connected with USART port to the device. On HyperTerminal, this is done by selecting "Transfer -> Send Text File"(this does not prevent you from sending binary files). The transfer will start and then you could read the file in the HyperTerminal.