
M0A21/M0A23 Series
May 06, 2022
Page
710
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
DAC Trigger Selection
The DAC conversion can be started by writing DAC_DAT, software trigger or hardware trigger. When
TRGEN (DAC_CTL[4]) is 0, the data conversion is started by writing DAC_DAT register. When TRGEN
(DAC_CTL[4]) is 1, the data conversion is started by timer event or software trigger. If the software
trigger is selected, the conversion starts once the SWTRG (DAC_SWTRG[0]) is set to 1. The SWTRG
is cleared to 0 by hardware automatically when DAC_DATOUT has been loaded with DAC_DAT
content. The TRGSEL (DAC_CTL[7:5]) determines which event is selected to start the conversion.
When DAC detects a rising edge on the selected trigger event input, the last data stored in DAC_DAT
is transferred into the DAC_DATOUT[4:0] and DAC starts converting once DAC_DATOUT[4:0] is
updated.
Trigger Event
0x13
PCLK
0x13
0x14
0x14
DAC_DAT
DAC_DATOUT
Figure 6.20-3 DAC Conversion Started by Hardware Trigger Event
PDMA Operation
DAC to PDMA request is generated when a hardware trigger event occurs while DMAEN (DAC_CTL[2])
is set. The content of DAC_DAT is transferred to the DAC_DATOUT[4:0] and DAC starts data
conversion. The new transferred data by PDMA in DAC_DAT will be converted when next trigger event
arrives. Figure 6.20-4 shows the DAC PDMA underrun condition, when the second DAC to PDMA
request trigger event arrives before the first conversion finish, then no new PDMA request is issued and
DMA underrun flag DMAUDR (DAC_STATUS[1]) is set 1 to report the error condition. DMA data
transfers are then disabled and no further DMA request is treated and DAC continues to convert last
data. An interrupt is also generated if the corresponding DMAURIEN (DAC_CTL[3]) is enabled. User
has to change the trigger event frequency in timer and then start DAC conversion again.