hi,
I am using TM4C129x kit for my project. My requirement is to play a .wav file on Dk-TM4C129X dev platform.
I am using the sound driver sound.c present in the directory C:\ti\TivaWare_C_Series-2.0\examples\boards\dk-tm4c129x\drivers . I have followed the example present in the chapter 7 of SW-DK-TM4C129X-UG-2.0.pdf to create the sample application.
void playSound (void) { int16_t i; bool b_isBusy; g_ui32SysClock = SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000); SoundInit(g_ui32SysClock); b_isBusy = SoundBusy(); if(!b_isBusy) { SoundVolumeSet(255); // // Start the playback of audio. // SoundStart(g_pi16SoundExampleBuffer, SOUND_NUM_SAMPLES, 8000, SoundExampleCallback); } }
where g_pi16SoundExampleBuffer contains the PCM data from the .wav file.
While executing the function SoundStart () of the driver sound.c the system raise an interrupt at the statement
// // Enable the speaker amp. // ROM_GPIOPinWrite(GPIO_PORTD_BASE, GPIO_PIN_4, GPIO_PIN_4);
and enters into an infinite loop at:
;****************************************************************************** ; ; This is the code that gets called when the processor receives a fault ; interrupt. This simply enters an infinite loop, preserving the system state ; for examination by a debugger. ; ;****************************************************************************** FaultISR B FaultISR
What is the wrong with this approach ? Is there any example program available which explains the use of sound.c driver on TM4C192XNCZAD?