3.5 Data Transfer from Internal Memory to DAC

Data stored in the internal Program Flash Memory (PFM) can be seamlessly transferred to DAC using DMA. The DMA setup configurations are listed in Table 3-5.

Table 3-5. DMA Setup Configuration (DMA6)
DMA6 Setup
SSASource AddressBeginning of space allocated for audio storage
SSZSource Size256 (1 page data from PFM)
SMRSource Memory RegionPFM
SMODESource Address ModeSPTR is incremented
DSADestination Address&DAC1DATL
DSZDestination Size1
DMODEDestination Address ModeDPTR remains unchanged
SIRQENStart Trigger EnableYes
SIRQStart TriggerTMR0 (sampling timer)
SSTPSource Counter Reload StopYes - SIRQEN is cleared when source counter reloads
DSTPDestination Counter Reload StopNo - SIRQEN not cleared
AIRQENAbort Trigger EnableNo (stops when DCNT reloads)
AIRQAbort TriggerN/A
How It Works:
  1. Enable SIRQEN to kick off DMA at the next timer overflow. This allows the DMA data transfer rate to match the sampling timer rate.
  2. The DMA stops when an entire page of audio data has been read.
  3. To read the next PFM page, SSA can be updated with the new address.
  4. Repeat to read as many pages of stored audio data.