C40_Ip.c C40_Ip_MainInterfaceWrite funtion error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

C40_Ip.c C40_Ip_MainInterfaceWrite funtion error

2,011 次查看
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 回复数

1,989 次查看
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 项奖励
回复

1,975 次查看
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 项奖励
回复

1,968 次查看
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 项奖励
回复