Content originally posted in LPCWare by dennisyeung on Thu Apr 24 03:30:57 MST 2014
Hi NXP FAE,
I found the fact that causing the HardFault Error without knowing the reason.
Inside the GUI_Init, it access the code MATRIX_ARB = 0xD, this causes the erase_user_flash to generate HardFault Error.
That is:
MATRIX_ARB = 0xD;
erase_user_flash(); // Running this code with MATRIX_ARB is accessed, it will generate the error code.
With the MATRIX_ARB = 0xD is removed inside the _Initlcdcontroller, that is:
GUI_Init(); // No MATRIX_ARB access inside the _Initlcdcontroller
erase_user_flash(); // It works well
Can anyone know why accessing MATRIX_ARB will causes the erase_user_flash() to generate the HardFault Error?
BR
Dennis