S32K3 C40 IP Hardware Fault

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

S32K3 C40 IP Hardware Fault

1,441 Views
francescovico
Contributor III

I'm working on a Bootloader that reside in Code Flash Block 0 (From 0x400000 to 0x4FFFFF).

Any erase/write inside this block cause an Hard Fault even with:

  • C40_Ip_MainInterfaceSectorErase
  • C40_Ip_MainInterfaceSectorEraseStatus
  • C40_Ip_MainInterfaceWrite
  • C40_Ip_MainInterfaceWriteStatus

In SRAM.

Only erase/write in Code Flash Block 1 or 2 or 3 it's allowed.

My Application must reside in  Block 1 ?

The residual code flash Block 0 it's lost?

Regards, Francesco.

0 Kudos
Reply
3 Replies

1,420 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @francescovico 

To rule out a potential Read-While-Write Event Error (RWE), it is recommended to put flash operations into SRAM. This approach helps to prevent such errors.

Please refer following thread, which includes an example code.

S32K312_C40_Ip_SRAM_RTD_500_DS35

 

BR, VaneB

0 Kudos
Reply

1,392 Views
francescovico
Contributor III

Hi @VaneB ,

I have solved the problem putting also the functions below in SRAM:

-SchM_Enter_Mem_43_INFLS_MEM_EXCLUSIVE_AREA_01

- ....

-SchM_Exit_Mem_43_INFLS_MEM_EXCLUSIVE_AREA_23

- All C40_Ip functions

Unfortunally these functions are in RTD and at each code generation by ConfigTools the functions are restored at original version.

Regards, Francesco. 

 

0 Kudos
Reply

1,371 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @francescovico 

I am glad to hear the issue has been solved.

Any changes made to the RTD files will be automatically reverted to their original state each time ConfigTools performs an update.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2174341%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K3%20C40%20IP%20Hardware%20Fault%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2174341%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI'm%20working%20on%20a%20Bootloader%20that%20reside%20in%20Code%20Flash%20Block%200%20(From%200x400000%20to%200x4FFFFF).%3C%2FP%3E%3CP%3EAny%20erase%2Fwrite%20inside%20this%20block%20cause%20an%20Hard%20Fault%20even%20with%3A%3C%2FP%3E%3CUL%3E%3CLI%3EC40_Ip_MainInterfaceSectorErase%3C%2FLI%3E%3CLI%3EC40_Ip_MainInterfaceSectorEraseStatus%3C%2FLI%3E%3CLI%3EC40_Ip_MainInterfaceWrite%3C%2FLI%3E%3CLI%3EC40_Ip_MainInterfaceWriteStatus%3C%2FLI%3E%3C%2FUL%3E%3CP%3EIn%20SRAM.%3C%2FP%3E%3CP%3EOnly%20erase%2Fwrite%20in%26nbsp%3BCode%20Flash%20Block%201%20or%202%20or%203%20it's%20allowed.%3C%2FP%3E%3CP%3EMy%20Application%20must%20reside%20in%26nbsp%3B%20Block%201%20%3F%3C%2FP%3E%3CP%3EThe%20residual%20code%20flash%20Block%200%20it's%20lost%3F%3C%2FP%3E%3CP%3ERegards%2C%20Francesco.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2175199%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K3%20C40%20IP%20Hardware%20Fault%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2175199%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F153065%22%20target%3D%22_blank%22%3E%40francescovico%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20am%20glad%20to%20hear%20the%20issue%20has%20been%20solved.%3C%2FP%3E%0A%3CP%3EAny%20changes%20made%20to%20the%20RTD%20files%20will%20be%20automatically%20reverted%20to%20their%20original%20state%20each%20time%20ConfigTools%20performs%20an%20update.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2174829%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K3%20C40%20IP%20Hardware%20Fault%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2174829%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F201913%22%20target%3D%22_blank%22%3E%40VaneB%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3EI%20have%20solved%20the%20problem%20putting%20also%20the%20functions%20below%20in%20SRAM%3A%3C%2FP%3E%3CP%3E-SchM_Enter_Mem_43_INFLS_MEM_EXCLUSIVE_AREA_01%3C%2FP%3E%3CP%3E-%20....%3C%2FP%3E%3CP%3E-SchM_Exit_Mem_43_INFLS_MEM_EXCLUSIVE_AREA_23%3C%2FP%3E%3CP%3E-%20All%20C40_Ip%20functions%3C%2FP%3E%3CP%3EUnfortunally%20these%20functions%20are%20in%20RTD%20and%20at%20each%20code%20generation%20by%20ConfigTools%20the%20functions%20are%20restored%20at%20original%20version.%3C%2FP%3E%3CP%3ERegards%2C%20Francesco.%26nbsp%3B%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2174444%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K3%20C40%20IP%20Hardware%20Fault%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2174444%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F153065%22%20target%3D%22_blank%22%3E%40francescovico%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20rule%20out%20a%20potential%20Read-While-Write%20Event%20Error%20(RWE)%2C%20it%20is%20recommended%20to%20put%20flash%20operations%20into%20SRAM.%20This%20approach%20helps%20to%20prevent%20such%20errors.%3C%2FP%3E%0A%3CP%3EPlease%20refer%20following%20thread%2C%20which%20includes%20an%20example%20code.%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FS32K312-C40-Ip-SRAM-RTD-500-DS35%2Fta-p%2F2074245%22%20target%3D%22_blank%22%3ES32K312_C40_Ip_SRAM_RTD_500_DS35%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBR%2C%20VaneB%3C%2FP%3E%3C%2FLINGO-BODY%3E