2010-08-18 03:24 AM
Got Hard Fault exception in the UART IAP example
#iap2011-05-17 05:03 AM
Absent any specific code example, or example of the data being uploaded, one might reasonably surmise that what you are uploading is invalid, and you are either jumping to, or executing, code which touches memory it should not.
You are likely to get a Hard Fault if you execute code on an even boundary (PC), the STM32 supports only 16-bit THUMB code, not 32-bit ARM. You set your stack pointer (SP) outside of RAM, or incorrectly aligned. Touch memory outside the normal RAM, FLASH, or Peripheral space, or was incorrectly aligned. Suggest you attach at JTAG debugger to the system and step through the code, observing the memory/register settings when it faults. Or instrument the Hard Fault handler to display details of the faulting code.2011-05-17 05:03 AM
Hi clive1,
Thanks for your kindly help! I found what is wrong on the code. Yup, due to incorrect address assigned, it points to a wrong address and then caused this problem. Thanks again!