Dear friends,
I am having problems using emWin library on LPC1788. I executed the code and set a break-point on GUI_X_Init. The code reaches this point which implies that RAM works fine and the function LCD_X_Config is executed successfully. However after this point a hard fault condition occurs.
Can you tell me where the execution goes after GUI_X_Init so that I can track the flow of the program and find what might be causing hard fault?
Or do you have any idea what the problem might be?
Best regards
LPC1788 Hard Fault after GUI_X_Init
-
-
Hi,
you wrote: "However after this point a hard fault condition occurs"
Where exactly does the problem occur? What exactly causes the hard fault? You can find it out by checking the LR-register within the hard fault handler or by returning from there with a "BX LR"
Regards...
-
Hello,
Please check if you have sufficient stack. In case you have, please verify the following CPU registers in order to determine the cause of the HardFault Handler:
C<previous> <-- SP points here before exception SP + 0x1C xPSR SP + 0x18 PC SP + 0x14 LR SP + 0x10 R12 SP + 0x0C R3 SP + 0x08 R2 SP + 0x04 R1 SP + 0x00 R0 <-- SP points here after exception
Best regards,
Adrian -
Dear Adrian,
Thanks a lot for your answers.
As per your suggestion I took an screenshot from the assembly part that causes the problem. Please refer to the attached picture for more information.
Yours sincerely -
Dear Adrian,
After the execution of the code, suddenly the line of code I posted previously is executed successfully. However the hard fault condition occurs in another line of code. I have attached the screenshots of where hard-fault occurs and the hard-fault itself.
Regards
-
Closed, since this problem is dealt with in the thread below:
https://forum.segger.com/index.php?page=Thread&threadID=2568
- Adrian
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!