AM263Px MCU+ SDK: DAC Sine DMA

| AM263Px MCU+ SDK 26.00.00 |

DAC Sine DMA

# Introduction

This example uses DMA to generate a sine wave on the DAC output.

Module Block diagram

The example does the below

- Configures Timer to generate DMA trigger at a rate of 20KHz.
- Calculates sine values and stores it in a buffer (sine table).
- Uses DMA to transfer sine values stored in the sine table to DAC.
- This repeated programming of the DAC registers generates a sine wave.
- The generated output can be viewed throug an oscilloscope on the DAC output pin.

# External Connections

- DAC output pin can be connected to an oscilloscope to view the sine wave output.

## AM263X-CC or AM263PX-CC or AM261X-SOM E1

Note: To use the reference voltage generated on ControlCard, make sure that the System VREF source select switch on ControlCard is set to position 1-2

When using with TMDSHSECDOCK (HSEC180 controlCARD Baseboard Docking Station)

- Capture waveform on HSEC Pin 9 (in case of AM261x and AM263Px please take care of IO expander)

## AM263X-LP or AM263PX-LP

With AM263X-LP or AM263Px-LP Note: To use the reference voltage generated on LaunchPad, make sure that the DAC_VREF source select switch S1 on LaunchPad is set to position 1-2

- Capture the waveform on boosterpack header J1/J3 Pin 30

# Supported Combinations

Parameter | Value
--- | ---
CPU + OS | r5fss0-0 nortos
Toolchain | ti-arm-clang
Board | am263px-cc
Example folder | examples/drivers/dac/dac_sine_dma/

# Steps to Run the Example

- When using CCS projects to build, import the CCS project for the required combination and build it using the CCS project menu (see Using SDK with CCS Projects).
- When using makefiles to build, note the required combination and build using make command (see Using SDK with Makefiles)
- Establish connections as mentioned in External Connections section
- Launch a CCS debug session and run the executable, see CCS Launch, Load and Run
- Use an Oscilloscope to view the sine wave on DAC output pin.

# See Also

DAC

# Sample Output

Shown below is a sample output when the application is run,

DAC Sine DMA Test Started ...
DAC Sine DMA Test Passed!!
All tests have passed!!

Sample Output