What is the value of pu8Ptr when it hard faults?
Are you sure that it is pointing to the flash since it can't be calculated from the code that you have shown (some define values are not shown).
Thank you for your reply.
Yes, the value of pu8Ptr pointer is pointing to the flash. Whenever I debug, pu8Ptr pointer points the
assigned memory address in flash.
what is the value of pu8Ptr?
And I see that you have stuff allocated at 0x10'0000, but your device has FLASH only up to 0x8'0000?
I hope this helps,