English
Language : 

PXD20RM Datasheet, PDF (1387/1628 Pages) Freescale Semiconductor, Inc – PXD20 Microcontroller
39.9.1.2 Alarm sound
39.9.1.2.1 Description
The application will playback a repetitive sound with a blank period in between.
The duration of a single sound can go up to 5s (typical 2.5s), the duration of the blank period should be the
same, sampling rate and sample width are identical to the voice test case.
The duration of the repetition can be or not programmable in number of cycles (1 cycle being the
sound+the blanking time).
As an example, we can imagine an indicator noise.
39.9.1.2.2 SGM functionality
The user programs the SGM sample rate, the sample width and the number of samples for the sound and
the duration of the deadtime. The user also programs the SGM to have it as free running (repeating until
the user will stop it) or with a limited duration (repeat number).
The user will program inside the DMA the address of the sound in the system memory and enable the
channel.
Table 39-42. Work flow for Alarm Sound in WAV mode
CPU (main)
CPU(ISR)
SGM
0. Clear the SGMCTL.MDIS to enable SGM
1. Configure the DMA descriptor to move the PCM
data from memory to FIFO
2. Check the SGMST. If the FIFO of current
channel is ready(FLSCHx=0), configure the FIFO
watermark. Then enable the DMA request
DMA controller will move the PCM data
from memory to SGM FIFO
3. Configure the SGM
• Clocking/ Wave mode
• Enable the Repeat mode, configure the repeat
number and Sample Format
• *Enable the Playback Duration interrupt and
repeat duration interrupt (optional)
• check the FIFO status. If the fifo is not empty,
enable the SGMCTL.SOGCHx
Start the sound playback
Generate the 1st repeat
DMA transfer completion ISR: ......
configure the DMA descriptor
of moving the next part PCM
data from memory to FIFO.
......
*At the end of 1st PlayBack duration,
SGM will raise the interrupt of PlayBack
Duration. (optional)
DeadTime
...
Freescale Semiconductor
PXD20 Microcontroller Reference Manual, Rev. 1
Preliminary—Subject to Change Without Notice
39-63