Hi,
I'm trying to understand a HardFault that I'm getting. This is my setup:
* Keil uVision V4.03q (Windows 7) * Landtiger development board with LPC1768 * 3.2" TFT LCD Model HY32D (compatible with SSD1289)
I want to use the emWin graphics libraries using the example "NXP_emWin514_MCB1700_Keil_CMSIS". I've adapted the LCDConf.c to match the board, so I modified _InitController(), which I guess it's ok because it works fine with other examples. The application hangs at GUI_Init() and after doing some debugging I found that its going to a HardFault. The Fault Reports window show INVSTATE in the "Usage Faults". Does anyone know what this means and what causes this so I can solve this? Thanks!
You only need bare assembly skills, just enough to determine which address the load/store is acting on.
Good chance you corrupting (zeroing) the stack here. Stack and Heap sizes described in startup.s
PC = 0 is an invalid condition, it is an EVEN address (that itself will fault), and would expect to be a vector table at this location.