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:
Display All
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:
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!
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:
C Source Code
- 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:
Source Code
- 0x08003CB2 4803 LDR r0,[pc,#12] ; @0x08003CC00x08003CB4 F7FDFF22 BL.W GUI_ALLOC_AssignMemory (0x08001AFC) 104: GUI_SetDefaultFont(GUI_FONT_6X8); 105: 0x08003CB8 4802 LDR r0,[pc,#8] ; @0x08003CC40x08003CBA F7FFFD81 BL.W GUI_SetDefaultFont (0x080037C0) 106: } 0x08003CBE BD10 POP {r4,pc}0x08003CC0 0000 DCW 0x00000x08003CC2 D060 DCW 0xD0600x08003CC4 0D00 DCW 0x0D000x08003CC6 0804 DCW 0x0804
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!