emWin gives hard fault when displaying text with SSD1963

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

emWin gives hard fault when displaying text with SSD1963

971 Views
philiphills
Contributor I

I am using the NXP emWin (5.38a) library running on an LPC1768 to drive a 800 x 480 pixel LCD panel using a Solomon SSD1963 controller. Starting with the MCB1700 bsp as a template, I have configured emWin to use the FlexColor driver with 16 bpp, no cache, and a 16 bit parallel bus, and allocated 30K bytes of RAM for emWin. The display initializes properly, and I can execute various graphical commands such as GUI_SetColor, GUI_FillCircle, GUI_Clear, GUI_SetBkColor, GUI_SetPenSize, GUI_Drawline, etc. However, if I try to display any text, such as GUI_DispString, I get a hard fault within the library function GUIMONO_DispChar(). Looking at the faults register I see:

Faults     = UndefInstr

Fault PC   = 0x00003D40

           = GUIMONO_DispChar + 108 in section .text

           = No line number information available for address 0x3d40 <GUIMONO_DispChar+108>

 

Fault status registers:

IPSR       = 0x1000003: 3  (HardFault)

CFSR       = 00010000 (Configurable Fault Status Register)

HFSR       = 40000000 (Hard Fault Status Register)

DFSR       = 00000000 (Debug Fault Status Register)

MMAR       = e000edf8 [INVALID] (MemManage Fault Address Register)

BFAR       = e000edf8 [INVALID] (Bus Fault Address Register)

AFSR       = 00000000 (Auxiliary Fault Status Register)

 

I am at a loss as to why this is happening. Any clues as to what might be the cause of the problem?

Labels (1)
Tags (3)
0 Kudos
1 Reply

532 Views
philiphills
Contributor I

I figured it out – I was using the wrong library. NXP documentation states “There is one set of library files for each of the 5 ARM cores and one for the x86 core.” I switched the library file to libemWin_M3.a and now can display text properly.

 

The clue was the fault UndefInstr; apparently the library was calling for an instruction not included in the M3 core of the LPC1768.

 

0 Kudos