Software Examples
22
SLAU678A – March 2016 – Revised April 2016
Copyright © 2016, Texas Instruments Incorporated
MSP430FR5994 LaunchPad™ Development Kit (MSP
‑
EXP430FR5994)
3.3
BOOSTXL-AUDIO Audio Record and Playback Example
This section describes the functionality and structure of the BOOSTXL-
AUDIO_RecordPlayback_MSP430FR5994 demo that is included in the
download, or that is more easily accessible through MSPWare (see
).
3.3.1
Source File Structure
The project is split into multiple files (see
). This makes it easier to navigate and reuse parts of it
for other projects.
Table 9. Source File and Folders
Name
Description
main.c
The demo's clock, GPIO, DAC and interrupt configurations.
application/application.c
Main application loop and interrupt service routines
application/audio_collect.c
Setup, start, stop and shutdown audio collect functions
application/audio_playback.c
Setup, start and stop playback functions and interrupt service routines
application/dac8311.c
Operating modes/functions of the onboard SPI DAC
application/global.h
Global variables definitions
Library: driverlib
3.3.2
Operation
This demo uses the built-in ADC12 on the MSP430FR5994 MCU to sample from the output of the analog
microphone on the Audio Signal Processing BoosterPack plug-in module. Using direct memory access
(DMA), the 12-bit microphone data is stored and retrieved from FRAM memory. During playback, the
microphone data is sent through SPI to the onboard DAC to drive the audio output of the onboard speaker
or headphones.
To begin recording an audio sample, press switch S1 on the MSP-EXP430FR5994 (see
). LED1
turns on while audio is being recorded and turns off when the recording phase is complete. Headphones
with an inline microphone can be used to record audio. The BoosterPack plug-in module automatically
detects the inline microphone when the headphones are plugged into the provided jack (J6) and records
from it instead of the onboard microphone.
Figure 15. Record
To play back the recorded audio sample, press switch S2 on the MSP-EXP430FR5994 LaunchPad
development kit (see
). LED2 turns on during playback and turns off when the playback phase is
complete. To use headphones to listen to the audio playback, plug headphones into the provided jack J6.