ctimer_dma_trigger#
Overview#
This example shows how to use CTimer to trigger DMA transfer by match feature.
DMA requests are generated when the value of Timer Counter (TC) matches match register.
In this example, CTimer match event occurs every 1 second and then trigger DMA transfer.
After DMA transfer two times, that is 2 seconds later, CTimer counter stops and DMA will
not be triggered.
This example do not generate external outputs.
Running the demo#
The log below shows example output of the CTimer driver simple match demo in the terminal window:
CTimer trigger DMA memory to memory transfer example begin.
Destination Buffer:
0 0 0 0
CTimer trigger DMA memory to memory transfer example finish.
Destination Buffer:
1 2 3 4
5 6 7 8
Supported Boards#
FRDM-MCXA156
Hardware requirements
Type-C USB cable
FRDM-MCXA156 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
FRDM-RW612
Hardware requirements
Micro USB cable
FRDM-RW612 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a micro USB cable between the PC host and the MCU-Link USB port (J10) on the board
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Launch the debugger in your IDE to begin running the demo.
FRDM-MCXA266
Hardware requirements
Type-C USB cable
FRDM-MCXA266 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
FRDM-MCXA366
Hardware requirements
Type-C USB cable
FRDM-MCXA366 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
FRDM-MCXC162
Hardware requirements
Type-C USB cable
FRDM-MCXC162 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
FRDM-MCXA577
Hardware requirements
Type-C USB cable
FRDM-MCXA577 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
FRDM-MCXA287
Hardware requirements
Type-C USB cable
FRDM-MCXA287 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
FRDM-MCXL255
Hardware requirements
Type-C USB cable
FRDM-MCXL255 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port (J16) on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed.
CTimer trigger DMA memory to memory transfer example begin.
Destination Buffer:
0 0 0 0
CTimer trigger DMA memory to memory transfer example finish.
Destination Buffer:
1 2 3 4
5 6 7 8