Hello:
I am learning TM4C123XGL with CCS6.0.1. I learned how to use grlib and ADC from the TM4C123G_LaunchPad_Workshop_Workbook.pdf.
The ADC12 and grlib work well in the practice Lab5 and Lab10 separately. However, when I put them together, It does not work. I do not know the reason.
I use ADC0 S1 to get the temperature and want to display the temperature on Kentec Lcd.
I use Timer5 A to trigger ADC0 and want to display the average temperature on LCD in Timer0 A's interrupt handler. I set Timer0 A timeout as 4seconds.
However, when I call the GrStringDraw in timer0A 's ISR, I got trapped in FaultISR. Somebody in this forum said it was because the stack size is too small, I changed LINKer configuration for this project from 100 to 2048. However, after this change, all the data read from ADC12 keeps 0 and never change anymore.
After I comment out some code related to Kentec (include initailization and DrawString in timer0A's ISR) the ADC data comes back.
Does this because LCD and ADC fighting on same hardware resource so they can not work well simultaneously? Can anyone give me any hints ? Thanks a lot..
My code is below. I already commented out some code related to Kentec: