Part Number: DK-TM4C129X
Tool/software: Code Composer Studio
Hello,
I am working on a project that involves sampling of the analog signal and performing FFT on it and capturing the fundamental frequency index and amplitude and displaying on the Kentec K350QVGV2-F 320x240 LCD display. To display them, I used the snprintf() function to convert the fundamental amplitude (float value) to a string, and then the GrStringDraw function to display that string, but when the Grstringdraw function is called, program goes to FaultISR(). I tried to increase the stack size from 512 to 2048, but it didnt work. Removing GrStringDraw() and then running doesnt causes the FaultISR, so it is sure that this function causes the error. I tried debugging with the "spma043" documentation on diagnosing faultISR, but it didnt help. My NVIC_FAULT_STAT register is having the instruction bus error bit sit.
This is how I am using the function:
uint32_t fftSize = 256; uint32_t ifftFlag = 0; uint32_t doBitReverse = 1; float32_t maxValue; uint32_t testIndex = 0; tContext sContext; uint32_t sysclock; char buffer[100]; /* Process the data through the CFFT/CIFFT module */ arm_cfft_f32(&arm_cfft_sR_f32_len256, testInput_f32_10khz, ifftFlag, doBitReverse); /* Process the data through the Complex Magnitude Module for calculating the magnitude at each bin */ arm_cmplx_mag_f32(testInput_f32_10khz, testOutput, fftSize); testOutput[0] = 0; /* Calculates maxValue and returns corresponding BIN value */ arm_max_f32(testOutput, fftSize, &maxValue, &testIndex); snprintf(buffer, 100, "%06f", maxValue); GrStringDraw (&sContext,buffer,-1,100,50,0); //GrStringDrawCentered(&sContext, buffer, -1, //GrContextDpyWidthGet(&sContext) / 2, 50, false);
Does someone have any ideas on how to solve this issue?
Thanks,
Harshul