SPMA084 December 2021 TM4C1230C3PM , TM4C1230C3PM , TM4C1230D5PM , TM4C1230D5PM , TM4C1230E6PM , TM4C1230E6PM , TM4C1230H6PM , TM4C1230H6PM , TM4C1231C3PM , TM4C1231C3PM , TM4C1231D5PM , TM4C1231D5PM , TM4C1231D5PZ , TM4C1231D5PZ , TM4C1231E6PM , TM4C1231E6PM , TM4C1231E6PZ , TM4C1231E6PZ , TM4C1231H6PGE , TM4C1231H6PGE , TM4C1231H6PM , TM4C1231H6PM , TM4C1231H6PZ , TM4C1231H6PZ , TM4C1232C3PM , TM4C1232C3PM , TM4C1232D5PM , TM4C1232D5PM , TM4C1232E6PM , TM4C1232E6PM , TM4C1232H6PM , TM4C1232H6PM , TM4C1233C3PM , TM4C1233C3PM , TM4C1233D5PM , TM4C1233D5PM , TM4C1233D5PZ , TM4C1233D5PZ , TM4C1233E6PM , TM4C1233E6PM , TM4C1233E6PZ , TM4C1233E6PZ , TM4C1233H6PGE , TM4C1233H6PGE , TM4C1233H6PM , TM4C1233H6PM , TM4C1233H6PZ , TM4C1233H6PZ , TM4C1236D5PM , TM4C1236D5PM , TM4C1236E6PM , TM4C1236E6PM , TM4C1236H6PM , TM4C1236H6PM , TM4C1237D5PM , TM4C1237D5PM , TM4C1237D5PZ , TM4C1237D5PZ , TM4C1237E6PM , TM4C1237E6PM , TM4C1237E6PZ , TM4C1237E6PZ , TM4C1237H6PGE , TM4C1237H6PGE , TM4C1237H6PM , TM4C1237H6PM , TM4C1237H6PZ , TM4C1237H6PZ , TM4C123AE6PM , TM4C123AE6PM , TM4C123AH6PM , TM4C123AH6PM , TM4C123BE6PM , TM4C123BE6PM , TM4C123BE6PZ , TM4C123BE6PZ , TM4C123BH6PGE , TM4C123BH6PGE , TM4C123BH6PM , TM4C123BH6PM , TM4C123BH6PZ , TM4C123BH6PZ , TM4C123BH6ZRB , TM4C123BH6ZRB , TM4C123FE6PM , TM4C123FE6PM , TM4C123FH6PM , TM4C123FH6PM , TM4C123GE6PM , TM4C123GE6PM , TM4C123GE6PZ , TM4C123GE6PZ , TM4C123GH6PGE , TM4C123GH6PGE , TM4C123GH6PM , TM4C123GH6PM , TM4C123GH6PZ , TM4C123GH6PZ , TM4C123GH6ZRB , TM4C123GH6ZRB , TM4C1290NCPDT , TM4C1290NCPDT , TM4C1290NCZAD , TM4C1290NCZAD , TM4C1292NCPDT , TM4C1292NCPDT , TM4C1292NCZAD , TM4C1292NCZAD , TM4C1294KCPDT , TM4C1294KCPDT , TM4C1294NCPDT , TM4C1294NCPDT , TM4C1294NCZAD , TM4C1294NCZAD , TM4C1297NCZAD , TM4C1297NCZAD , TM4C1299KCZAD , TM4C1299KCZAD , TM4C1299NCZAD , TM4C1299NCZAD , TM4C129CNCPDT , TM4C129CNCPDT , TM4C129CNCZAD , TM4C129CNCZAD , TM4C129DNCPDT , TM4C129DNCPDT , TM4C129DNCZAD , TM4C129DNCZAD , TM4C129EKCPDT , TM4C129EKCPDT , TM4C129ENCPDT , TM4C129ENCPDT , TM4C129ENCZAD , TM4C129ENCZAD , TM4C129LNCZAD , TM4C129LNCZAD , TM4C129XKCZAD , TM4C129XKCZAD , TM4C129XNCZAD , TM4C129XNCZAD
These two examples demostrates playing a .wav file which is stored internally on the flash memory. Several example .wav files can be selected during compile time by using the #define DEMO directive. To play a different audio file, assign a new value to the macro DEMO. Once a new value is assigned, rebuild the project and the corresponding audio file becomes part of the program image that is ready to be programmed to the flash memory. These two examples are to be run on the EK-TM4C1294XL LaunchPad board. Remember to adjust the DAC SEL jumper on the BOOSTXL-AUDIO BoosterPack to select PWM or SPI DAC when changing between projects. The selected audio will be playbacked repeatedly. Press the USR_SW1 button on the board to pause the playback. Press the USR_SW2 button to resume playback.
Remember to adjust the DAC SEL jumper on the BOOSTXL-AUDIO BoosterPack to select PWM or SPI DAC when changing between projects.
#define DEMO 1
#if DEMO == 1
#include "demo_gettysburg.h"
#define AUDIOSIZE (uint32_t )__gettysburg10_wav_size
#define AUDIODATA __gettysburg10_wav
#endif
#if DEMO == 2
#include "demo_8bit_8kHz.h"
#define AUDIOSIZE (uint32_t )__pcm_mono_8_bit_8kHz_wav_size
#define AUDIODATA __pcm_mono_8_bit_8kHz_wav
#endif
#if DEMO == 3
#include "demo_chirp_16kHz.h"
#define AUDIOSIZE (uint32_t )__chirp_16kHz_wav_size
#define AUDIODATA __chirp_16kHz_wav
#endif
#if DEMO == 4
#include "demo_chirp_8kHz.h"
#define AUDIOSIZE (uint32_t )__chirp_8kHz_wav_size
#define AUDIODATA __chirp_8kHz_wav
#endif
#if DEMO == 5
#include "demo_16bit_8kHz.h"
#define AUDIOSIZE (uint32_t )__pcm_mono_16_bit_8kHz_wav_size
#define AUDIODATA __pcm_mono_16_bit_8kHz_wav
#endif
#if DEMO == 6
#include "demo_8bit_48kHz.h"
#define AUDIOSIZE (uint32_t )__tone_wav_size
#define AUDIODATA __tone_wav
#endif