MCUXpresso SDK Documentation

cmsis_usart_dma_transfer

cmsis_usart_dma_transfer#

Overview#

CMSIS-Driver defines generic peripheral driver interfaces for middleware making it reusable across a wide range of supported microcontroller devices. The API connects microcontroller peripherals with middleware that implements for example communication stacks, file systems, or graphic user interfaces. More information and usage method please refer to http://www.keil.com/pack/doc/cmsis/Driver/html/index.html.

The cmsis_uart_edma_transfer example shows how to use uart cmsis driver with EDMA:

In this example, one uart instance connect to PC through uart, the board will send back all characters that PC send to the board.

Note: The example echo every 8 characters, so input 8 characters every time.

Supported Boards#

EVK-MIMXRT595
Hardware requirements
  • Micro USB cable

  • EVK-MIMXRT595 board

  • Personal Computer

Board settings

No special is needed.

Prepare the Demo
  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J40) on the board

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Launch the debugger in your IDE to begin running the demo.

Running the demo

When the demo runs successfully, the log would be seen on the terminal like:

USART DMA example
Send back received data
Echo every 8 characters

When you input 8 characters, system will echo it by USART and them would be seen on the terminal.

EVK-MIMXRT685
Hardware requirements
  • Micro USB cable

  • EVK-MIMXRT685 board

  • Personal Computer

Board settings

No special is needed.

Prepare the Demo
  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J5) on the board

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Launch the debugger in your IDE to begin running the demo.

Running the demo

When the demo runs successfully, the log would be seen on the terminal like:

USART DMA example
Send back received data
Echo every 8 characters

When you input 8 characters, system will echo it by USART and them would be seen on the terminal.

FRDM-MCXW23
Hardware requirements
  • Type-C USB cable

  • FRDM-MCXW23 Board

  • Personal Computer

Board settings

No special is needed.

Prepare the Demo
  1. Connect a USB cable between the host PC and the FRDM board J10.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the demo runs successfully, the log would be seen on the OpenSDA terminal like:

USART DMA example
Send back received data
Echo every 8 characters

When you input 8 characters, system will echo it by USART and them would be seen on the OpenSDA terminal.

FRDM-RW612
Hardware requirements
  • Micro USB cable

  • FRDM-RW612 board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a micro USB cable between the PC host and the MCU-Link USB port (J10) on the board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Launch the debugger in your IDE to begin running the example.

Running the demo

When the demo runs successfully, the log would be seen on the terminal like:

USART DMA example
Send back received data
Echo every 8 characters

When you input 8 characters, system will echo it by USART and them would be seen on the terminal.

LPCXpresso51U68
Hardware requirements
  • Micro USB cable

  • lpcxpresso51u68 board

  • Personal Computer

Board settings

No special is needed.

Prepare the Demo
  1. Connect a micro USB cable between the PC host and the OpenSDA USB port on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Reset the SoC and run the project.

Running the demo

When the demo runs successfully, the log would be seen on the OpenSDA terminal like:

USART DMA example
Send back received data
Echo every 8 characters

When you input 8 characters, system will echo it by USART and them would be seen on the OpenSDA terminal.

LPCXpresso54628
Hardware requirements
  • Mini USB cable

  • lpcxpresso54628 board

  • Personal Computer

Board settings

No special is needed.

Prepare the Demo
  1. Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Reset the SoC and run the project.

Running the demo

When the demo runs successfully, the log would be seen on the OpenSDA terminal like:

USART DMA example
Send back received data
Echo every 8 characters

When you input 8 characters, system will echo it by USART and them would be seen on the OpenSDA terminal.

LPCXpresso54S018
Hardware requirements
  • Mini USB cable

  • lpcxpresso54S018 board

  • Personal Computer

Board settings

No special is needed.

Prepare the Demo
  1. Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Reset the SoC and run the project.

Running the demo

This demo is an external flash plain load demo, ROM will copy image in external flash to SRAMX to run:

  1. Build the demo to generate a bin file. Note: If need to generate bin file using MCUXpresso IDE, below steps need to be followed: Set in example Properties->C/C++ Build->Settings->Build steps->Post-build steps->Edit enbable arm-none-eabi-objcopy -v -O binary “&{BuildArtifactFileName}” “&{BuildArtifactFileBaseName}.bin”

      This plainload example linked the vector table to 0x00000000, but program to external flash 0x10000000.
    
  2. Program the bin file to external on board flash via SEGGER J-FLASH Lite(V6.22 or higher):

    a. Open SEGGER J-FLASH Lite, select device LPC54S018.

    b. Click the ‘Erase Chip’ to erase the extrenal flash.(if can not success, press SW4 button and reset the board, and try to erase again)

    c. Select the bin data file, set the ‘.bin/Erase Start’ address to 0x10000000, then click ‘Program Device’ Note: Please use above way to program the binary file built by armgcc tool chain to external flash. For IAR, KEIL, MCUXpresso IDE, you can use the IDE tool to program the external flash.
    When the demo runs successfully, the log would be seen on the OpenSDA terminal like:

USART DMA example
Send back received data
Echo every 8 characters

When you input 8 characters, system will echo it by USART and them would be seen on the OpenSDA terminal.

LPCXpresso54S018M
Hardware requirements
  • Mini USB cable

  • lpcxpresso54S018 board

  • Personal Computer

Board settings

No special is needed.

Prepare the Demo
  1. Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Reset the SoC and run the project.

Running the demo

This demo is an external flash plain load demo, ROM will copy image in external flash to SRAMX to run:

  1. Build the demo to generate a bin file. Note: If need to generate bin file using MCUXpresso IDE, below steps need to be followed: Set in example Properties->C/C++ Build->Settings->Build steps->Post-build steps->Edit enbable arm-none-eabi-objcopy -v -O binary “&{BuildArtifactFileName}” “&{BuildArtifactFileBaseName}.bin”

      This plainload example linked the vector table to 0x00000000, but program to external flash 0x10000000.
    
  2. Program the bin file to external on board flash via SEGGER J-FLASH Lite(V6.22 or higher):

    a. Open SEGGER J-FLASH Lite, select device LPC54S018M.

    b. Click the ‘Erase Chip’ to erase the extrenal flash.(if can not success, press SW4 button and reset the board, and try to erase again)

    c. Select the bin data file, set the ‘.bin/Erase Start’ address to 0x10000000, then click ‘Program Device’ Note: Please use above way to program the binary file built by armgcc tool chain to external flash. For IAR, KEIL, MCUXpresso IDE, you can use the IDE tool to program the external flash.
    When the demo runs successfully, the log would be seen on the OpenSDA terminal like:

USART DMA example
Send back received data
Echo every 8 characters

When you input 8 characters, system will echo it by USART and them would be seen on the OpenSDA terminal.

LPCXpresso55S06
Hardware requirements
  • Mini USB cable

  • LPCXpresso55S06 board

  • Personal Computer

Board settings
Prepare the Demo
  1. Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Reset the SoC and run the project.

Running the demo

When the demo runs successfully, the log would be seen on the OpenSDA terminal like:

USART DMA example
Send back received data
Echo every 8 characters

When you input 8 characters, system will echo it by USART and them would be seen on the OpenSDA terminal.

LPCXpresso55S16
Hardware requirements
  • Mini USB cable

  • LPCXpresso55S16 board

  • Personal Computer

Board settings

The jumper setting: Default jumpers configuration does not work, you will need to add JP20 and JP21 (JP22 optional for ADC use)

Prepare the Demo
  1. Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Reset the SoC and run the project.

Running the demo

When the demo runs successfully, the log would be seen on the OpenSDA terminal like:

USART DMA example
Send back received data
Echo every 8 characters

When you input 8 characters, system will echo it by USART and them would be seen on the OpenSDA terminal.

LPCXpresso55S28
Hardware requirements
  • Mini USB cable

  • LPCXpresso55S28 board

  • Personal Computer

Board settings

No special is needed.

Prepare the Demo

Note: MCUXpresso IDE project default debug console is semihost

  1. Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Reset the SoC and run the project.

Running the demo

When the demo runs successfully, the log would be seen on the OpenSDA terminal like:

USART DMA example
Send back received data
Echo every 8 characters

When you input 8 characters, system will echo it by USART and them would be seen on the OpenSDA terminal.

LPCXpresso55S36
Hardware requirements
  • Mini USB cable

  • LPCXpresso55S36 board

  • Personal Computer

Board settings
Prepare the Demo
  1. Connect a mini USB cable between the PC host and the LPC-Link USB port (J1) on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Reset the SoC and run the project.

Running the demo

The following message shows in the terminal if the example runs successfully.

USART DMA example
Send back received data
Echo every 8 characters

When you input 8 characters, system will echo it by USART and them would be seen on the OpenSDA terminal.

LPCXpresso55S69
Hardware requirements
  • Mini USB cable

  • LPCXpresso55s69 board

  • Personal Computer

Board settings

No special is needed.

Prepare the Demo

Note: MCUXpresso IDE project default debug console is semihost

  1. Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.

  2. Open a serial terminal on PC for OpenSDA serial device with these settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Reset the SoC and run the project.

Running the demo

When the demo runs successfully, the log would be seen on the OpenSDA terminal like:

USART DMA example
Send back received data
Echo every 8 characters

When you input 8 characters, system will echo it by USART and them would be seen on the OpenSDA terminal.

MIMXRT685-AUD-EVK
Hardware requirements
  • Micro USB cable

  • MIMXRT685-AUD-EVK board

  • Personal Computer

Board settings

No special is needed.

Prepare the Demo
  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J5) on the board

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Launch the debugger in your IDE to begin running the demo.

Running the demo

When the demo runs successfully, the log would be seen on the terminal like:

USART DMA example
Send back received data
Echo every 8 characters

When you input 8 characters, system will echo it by USART and them would be seen on the terminal.

RD-RW612-BGA
Hardware requirements
  • Micro USB cable

  • RD-RW612-BGA board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a micro USB cable between the PC host and the MCU-Link USB port (J7) on the board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Launch the debugger in your IDE to begin running the example.

Running the demo

When the demo runs successfully, the log would be seen on the terminal like:

USART DMA example
Send back received data
Echo every 8 characters

When you input 8 characters, system will echo it by USART and them would be seen on the terminal.

MCXW23-EVK
Hardware requirements
  • Mini/micro USB cable

  • MCXW23-EVK Board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the EVK board J33.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the demo runs successfully, the log would be seen on the OpenSDA terminal like:

USART DMA example
Send back received data
Echo every 8 characters

When you input 8 characters, system will echo it by USART and them would be seen on the OpenSDA terminal.