Hi all,
I've a burning question with using the Widget tools from the Stellaris Graphic Library (FYI, I'm using LM4F232H5QD & K90DWN2-V1-FF LCD).
The problem is that after I added some Widgets and painted them, the WidgetMessageQueueProcess() function in the while loop stops my touch screen controller (as I no longer observe periodic pulses from the timer on the ADC pins on the oscilloscope). The program then enters into the FaultISR() loop, which means that the processor receives an unexpected interrupt.
What and who caused the unexpected interrupt? The only interrupt I'm activating is the TouchScreenIntHandler that is used by ADC3 for the 4-wire resistive touchscreen.
Does anyone have any experience with the graphics library? Do appreciate it if you can advise. Thanks a lot!
Attached is a copy of my code and project properties,
Include libraries
=================
"C:\StellarisWare"
"C:\StellarisWare\boards\ek-lm4f232"
Predefined symbols
==================
ccs
PART_LM4F232H5QD
TARGET_IS_BLIZZARD_RA1
File search paths
=================
"rtsv7M4_T_le_eabi.lib"
"C:\StellarisWare\driverlib\ccs-cm4f\Debug\driverlib-cm4f.lib"
"C:\StellarisWare\grlib\ccs-cm4f\Debug\grlib-cm4f.lib"
(main.c)
#include "inc/hw_types.h"
#include "driverlib/interrupt.h"
//#include "driverlib/flash.h"
#include "driverlib/sysctl.h"
#include "grlib/grlib.h"
#include "grlib/widget.h"
#include "grlib/canvas.h"
#include "grlib/pushbutton.h"
#include "drivers/kentec800x480x16_ssd1963_8bit.h"
#include "drivers/touch.h"
extern tCanvasWidget g_sBackground;
extern tPushButtonWidget g_sPushBtn;
void OnButtonPress(tWidget *pWidget);
Canvas(g_sBackground, WIDGET_ROOT, 0, 0,
&g_sLcd800x480x16_8bit, 0, 0, 800, 480,
CANVAS_STYLE_FILL, ClrRed, 0, 0, 0, 0, 0, 0);
Canvas(g_sHeading, &g_sBackground, 0, 0,
&g_sLcd800x480x16_8bit, 80, 48, 640, 374,
(CANVAS_STYLE_FILL | CANVAS_STYLE_OUTLINE | CANVAS_STYLE_TEXT),
ClrDarkBlue, ClrWhite, ClrWhite, g_pFontCm20, "hello-widget", 0, 0);
#ifdef DEBUG
void
__error__(char *pcFilename, unsigned long ulLine)
{
}
#endif
void main(void) {
//set the clocking to run at 50MHz using the PLL (400MHz / 2 / 4). System clock must be at least 7MHz
SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ);
// Enable interrupts
IntMasterEnable();
//initialize the display driver
Kentec800x480x16_ssd1963Init();
//Initialise the touch screen driver
TouchScreenInit();
WidgetAdd(WIDGET_ROOT,(tWidget *)&g_sBackground);
WidgetAdd((tWidget *)&g_sBackground,(tWidget *)&g_sHeading);
WidgetPaint(WIDGET_ROOT);
while(1){
WidgetMessageQueueProcess(); //-->causes program to go to FaultISR() infinite loop;
}
}



