C40_Ip.c C40_Ip_MainInterfaceWrite funtion error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

C40_Ip.c C40_Ip_MainInterfaceWrite funtion error

517 Views
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 Kudos
Reply
3 Replies

495 Views
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 Kudos
Reply

481 Views
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 Kudos
Reply

474 Views
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 Kudos
Reply