2016-08-02 07:06 AM
Hi,
I've just soldered a second PCB with a STM32F429ZIT6. The first PCB runs perfectly, so the code seems correct. I compile, and debug the code. The code is loaded correctly because there is any complain from Keil.
I've inherited this code from my old colleage which he currently isn't in my company, so I soldered this new board according to the schematic and I’ve resoldered all solders.
So, I’ve compile the code and load through debug and starts, goes fine untill arrives in GUI_Init which crashes!
I’ve debug the code and crashes in the last line of GUI_X_Config function:
void GUI_X_Config(void) {
//
// 32 bit aligned memory area
//
#ifdef GUI_BUFFER_IN_EXT_RAM
static U32 aMemory[GUI_NUMBYTES / 4]__attribute__((at(GUI_BUFFER_ADDRESS)));
#else
static U32 aMemory[GUI_NUMBYTES / 4];
#endif
//
// Assign memory to emWin
//
GUI_ALLOC_AssignMemory(aMemory, GUI_NUMBYTES);
//
// Set default font
//
GUI_SetDefaultFont(GUI_FONT_6X8);
}
I go over to disassembly code and in the line
0x08003C6A BD10 POP {r4,pc}
The code goes to HardFault_Handler function.The disassembly code is below:
0x08003C5E 4803 LDR r0,[pc,#12] ; @0x08003C6C
0x08003C60 F7FDFF22 BL.W GUI_ALLOC_AssignMemory (0x08001AA8)
104: GUI_SetDefaultFont(GUI_FONT_6X8);
105:
0x08003C64 4802 LDR r0,[pc,#8] ; @0x08003C70
0x08003C66 F7FFFD81 BL.W GUI_SetDefaultFont (0x0800376C)
106: }
0x08003C6A BD10 POP {r4,pc}
0x08003C6C 0000 DCW 0x0000
0x08003C6E D060 DCW 0xD060
0x08003C70 0B30 DCW 0x0B30
0x08003C72 0804 DCW 0x0804
88: {
0x08003C74 B510 PUSH {r4,lr}
Is it possible that the code is the problem?
If, for example, the display is not connect correctly should be the problem?
What does exactly GUI_Init function? does it check the hardware?
Thanks!
#crash #emwin #hangs #gui_init2016-09-06 02:36 AM
Hi Clive,
I've just checked the VCAP values and they are 1.30v in board working, also in the board which NOT works, and 1.1v in other fail board. Do you thing maybe I have to increase or discrease the capacitor's values?