cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103ZCT6 HardFaultException error ?

leo
Associate
Posted on July 15, 2009 at 08:06

STM32F103ZCT6 HardFaultException error ?

2 REPLIES 2
leo
Associate
Posted on May 17, 2011 at 13:17

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 ]

joseph239955
Associate II
Posted on May 17, 2011 at 13:17

Could you try change

_Dly1m = (FuncPtr)0x08010000;

to

_Dly1m = (FuncPtr)0x08010001;

and see if it help?