2009-07-14 11:06 PM
STM32F103ZCT6 HardFaultException error ?
2011-05-17 04:17 AM
Hi all,
I use STM32F103ZCT6 144pin to add nor flash, My main program put in nor flash memory ,and procedure that often uses put in STM32F103ZCT6 flash memory(ex, LCD function delay function). when main program call delay function, if I use debug ''Step Into'' is ok, but I use debug ''Go'', Error appears, into ''HardFaultException()''. STM32F103ZCT6 flash memory code: use stm32f10x_flash.icf add ''define symbol __ICFEDIT_region_Dly1m_start__ = 0x08010000;'' ''define symbol __ICFEDIT_region_Dly1m_end__ = 0x08010040;'' ''place at address mem:__ICFEDIT_region_Dly1m_start__ { readonly section Dly1m };'' my delay.h #pragma location=''Dly1m'' void _Dly1m(void); //======================================================== Nor flash memory code: use stm32f10x_nor.icf my main.c typedef void (*FuncPtr)(void); FuncPtr _Dly1m; viod main(void) { _Dly1m = (FuncPtr)0x08010000; : : _Dly1m(); // ''Step Into'' is ok,but ''Go'' is Error. : : } [ This message was edited by: leo.chang on 14-07-2009 13:46 ]2011-05-17 04:17 AM
Could you try change
_Dly1m = (FuncPtr)0x08010000; to _Dly1m = (FuncPtr)0x08010001; and see if it help?