C40_Ip.c C40_Ip_MainInterfaceWrite funtion error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

C40_Ip.c C40_Ip_MainInterfaceWrite funtion error

663件の閲覧回数
kimyonghak
Contributor I

Hi all,

I test s32k344 pflash write function with C40_Ip_MainInterfaceWrite in C40_Ip.c file

after first write 8 bytes at PFLASH by C40_Ip_pFlashBaseAddress->MCR |= FLASH_MCR_EHV_MASK; 
it generate HardFault_Handler exeption
how can i use this fuction without error ?
thanks 
 
0 件の賞賛
返信
3 返答(返信)

641件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @kimyonghak,

At what address do you program the 8bytes?

What kind of fault exception is it?

Can you read the Configurable Fault Status Register (CSFR) in the handler?

You can refer to this example C40_Ip_Example_S32K344.

 

BR, Daniel

0 件の賞賛
返信

627件の閲覧回数
kimyonghak
Contributor I

DEAR ..

Program byte is 8 byte

I found if I copy flash code to ram and run the code at ram 

then it works good , no exection occor 

copy below code to ram:

PFLASH by C40_Ip_pFlashBaseAddress->MCR |= FLASH_MCR_EHV_MASK; 

thank you.

0 件の賞賛
返信

620件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @kimyonghak,

Seems like you were trying to reprogram the flash from the same block.

danielmartynek_0-1685964445629.png

 

Regards,

Daniel

 

0 件の賞賛
返信