KW36 reading flash data caused HardFault_Handler

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

KW36 reading flash data caused HardFault_Handler

1,880 Views
wjw2023
Contributor I

Hi:

KW36 reading flash data caused HardFault_Handler!


1、different data is written to the same flash address twice consecutively。

uint8_t wdata[8] = {0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88};
NV_FlashProgram(0x00073778, 8, wdata);
wdata[0] = 0x00;
NV_FlashProgram(0x00073778, 8, wdata);

2、reading flash data caused HardFault_Handler。

uint8_t rdata[8] = {0};
memcpy(rdata, 0x00073778, 8);

3、The ecc verification error may occur because data is written to the same address twice;How does this error not trigger HardFault_Handler; can trigger FTFE_IRQHandler !

0 Kudos
Reply
5 Replies

1,860 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello,

 

Hope you are doing well. Could you please clarify what SDK version are you using?

 

Are you using an SDK example as a base? What modifications did you make?

 

Are you using a FRDM?

 

Why are you writing different data on the same address consecutively?

 

Regards,

Ricardo

0 Kudos
Reply

1,829 Views
wjw2023
Contributor I

sdk ver 2.25

Continuously write different data on the same address just to repeat the problem, the actual application does not know how to produce, the phenomenon is to read flash cause  HardFault_Handler.

NV FlashProgram for write and memcpy for read.

0 Kudos
Reply

1,821 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello,

 

The recommended API's are located on <SDK_Path>\middleware\wireless\framework\Flash\Internal\. The main functions are:

NV_FlashEraseSector

NV_FlashProgram

NV_FlashRead (FLib_MemCpy)

 

Regards,

Ricardo

0 Kudos
Reply

1,736 Views
wjw2023
Contributor I

Hello,

      Hope to get your help!

0 Kudos
Reply

1,810 Views
wjw2023
Contributor I

My requirement is very simple, is to read flash exception when do not trigger HardFault_Handler, can trigger FTFE_IRQHandler, how to configure? 

0 Kudos
Reply