MCUXpresso SDK Documentation

dma_ring_buffer

dma_ring_buffer#

Overview#

The DMA ring buffer example is a simple demonstration program that uses the SDK software.It demostrates how to implement ring buffer using the SDK DMA drivers.The purpose of this example is to show how to use the DMA and to provide a simple example for debugging and further development. There are two channels involved in this demo:

  1. channel 0 is used for handling the ring buffer transfer

  2. channel 1 is used for restart channel 0.

+——-+ +—————————–+ | start | –> | channel 0 transfer | <+ +——-+ +—————————–+ | | | | finished | v | +—————————–+ | | channel 1 restart channel 0 | -+ +—————————–+

Supported Boards#

FRDM-K32L2B
Hardware requirements
  • Mini/micro USB cable

  • FRDM-K32L2B board

  • Personal Computer

Board settings

The DMA memory to memory demo does not call for any special hardware configurations.

Prepare the Demo
  1. Connect a mini USB cable between the PC host and the OpenSDA USB 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. 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 example runs successfully, you can see the similar information from the terminal as below.

DMA ring buffer example begin.



Destination Buffer:

0	0	0	0	



DMA ring buffer example finish.



Destination Buffer:

8	9	10	11	
FRDM-MCXC242
Hardware requirements
  • Mini USB cable

  • FRDM-MCXC242 board

  • Personal Computer

Board settings

The DMA memroy to memory demo does not call for any special hardware configurations.

Prepare the Demo
  1. Connect a mini USB cable between the PC host and the OpenSDA USB 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. 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 example runs successfully, you can see the similar information from the terminal as below.

DMA ring buffer example begin.



Destination Buffer:

0	0	0	0	



DMA ring buffer example finish.



Destination Buffer:

8	9	10	11	
TWR-KM34Z50MV3
Hardware requirements
  • Mini USB cable

  • TWR-KM34Z50MV3 board

  • Personal Computer

Board settings

No special settings are required.

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

  2. Open a serial terminal with the following settings:

  • 115200 baud rate

  • 8 data bits

  • No parity

  • One stop bit

  • No flow control

  1. Download the program to the target board.

  2. 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 following message is displayed in the terminal:

DMA ring buffer example begin.



Destination Buffer:

0	0	0	0	



DMA ring buffer example finish.



Destination Buffer:

8	9	10	11	
TWR-KM34Z75M
Hardware requirements
  • Mini USB cable

  • TWR-KM34Z75M board

  • Personal Computer

Board settings

No special settings are required.

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

  2. Open a serial terminal with the following settings:

  • 115200 baud rate

  • 8 data bits

  • No parity

  • One stop bit

  • No flow control

  1. Download the program to the target board.

  2. 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 following message is displayed in the terminal:

DMA ring buffer example begin.



Destination Buffer:

0	0	0	0	



DMA ring buffer example finish.



Destination Buffer:

8	9	10	11	
TWR-KM35Z75M
Hardware requirements
  • Micro USB cable

  • TWR-KM35Z75M board

  • Personal Computer

Board settings

No special settings are required.

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

  2. Open a serial terminal with the following settings:

  • 115200 baud rate

  • 8 data bits

  • No parity

  • One stop bit

  • No flow control

  1. Download the program to the target board.

  2. 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 following message is displayed in the terminal:

DMA ring buffer example begin.



Destination Buffer:

0	0	0	0	



DMA ring buffer example finish.



Destination Buffer:

8	9	10	11