NXP s32k312 SRAM MultibitError

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

NXP s32k312 SRAM MultibitError

660 Views
Anitha7
Contributor III

@danielmartynek 

I’m able to hit the SRAM ISR (ERM0_ISR_Handler) for single-bit errors, but the handler is not being called for multi-bit errors.

As far as I understand, a non-correctable error event corresponds to a multi-bit error, correct?

I can see that the SRAM non-correctable error event bit is set in SR0, but the ISR is not being triggered.

Could you please help me understand how to call the multi-bit error ISR?

I enabled interrupt notification for SRAM0 in CR0 register also

Tags (1)
0 Kudos
Reply
5 Replies

637 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Anitha7,

I updated the example by adding uncorrectable error injection into SRAM0.

https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K344-EIM-ERM-DTCM-SRAM-Baremetal-v3-0-S3...

Can you read the VTOR register in your application?

The interrupt vector table must not reside in SRAM0 when injecting an uncorrectable ECC fault into the memory.

Otherwise, the ECC fault would corrupt the vector table during a fetch leading to another fault exception.

 

Regards,

Daniel

0 Kudos
Reply

630 Views
Anitha7
Contributor III

Hi @danielmartynek 

 

VTOR table points to flash memory only during SRAM0 inject uncorrectable ECC fault.

I configured the system for an SRAM0 as per your reference example code. uncorrectable ECC fault occur by setting the corresponding bit in the SRO register.

I enabled interrupt notification in corresponding CR0 register.

After uncorrectable ECC fault occurs, control transfers to the system call function, software not working after that until i perform reset. The ERM_1_Handler is not being triggered, even though I have added it. For single-bit errors, the ERM_0_Handler is triggered correctly.

What should I do to ensure that the ERM_1_Handler is invoked when a multi-bit (uncorrectable) ECC error occurs?

Also, just to confirm — does a multi-bit error always indicate an uncorrectable ECC fault?

 

0 Kudos
Reply

547 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Anitha7,

What do you mean by a multi-bit error?

There is one 8-bit checksum for 64bits (8 bytes) of data, it is not possible to detect every posilble ECC error. There is ECC SECDED (Single error correction, Double error detection).

 

Regards,

Daniel

 

0 Kudos
Reply

522 Views
Anitha7
Contributor III

hi @danielmartynek 

Multibit means Double bit as per RM

Anitha7_1-1762235798762.png

 

Anitha7_0-1762235788475.png

I configured the system for an SRAM0 as per your reference. uncorrectable ECC fault occur(NEC0) by setting the corresponding bit in the SRO register.

I enabled interrupt notification for NEC0 and single bit event in corresponding CR0 register.

After Non correctable ECC fault occurs, control transfers to the system call function, software not working after that until i perform reset. The ERM_1_Handler is not being triggered, even though I have added it. For single-bit errors, the ERM_0_Handler is triggered correctly.

What should I do to ensure that the ERM_1_Handler is invoked when a multi-bit (uncorrectable) ECC error occurs?

Also, just to confirm — does a multi-bit error(double bit error) always indicate an uncorrectable ECC fault?

After Non correctable ECC event occurs i need to perform reset run in ECU in normal mode

 

 

Tags (1)
0 Kudos
Reply

480 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Anitha7,

Uncorrectable faults trigger a CM7 fault exception.
In the example I linked, I enabled the Bus_Fault exception, but with a lower priority than the priority of the ERM handler so that the ERM handler is called first.

I believe this might be the issue in your project.

Also, double-check the VTOR pointer and ensure that the ERM interrupt is enabled in the NVIC. You may notice the interrupt pending in NVIC.

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2196615%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ENXP%20s32k312%20SRAM%20MultibitError%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2196615%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F160001%22%20target%3D%22_blank%22%3E%40danielmartynek%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%E2%80%99m%20able%20to%20hit%20the%20SRAM%20ISR%20(%3CSTRONG%3EERM0_ISR_Handler%3C%2FSTRONG%3E)%20for%20single-bit%20errors%2C%20but%20the%20handler%20is%20not%20being%20called%20for%20multi-bit%20errors.%3C%2FP%3E%3CP%3EAs%20far%20as%20I%20understand%2C%20a%20non-correctable%20error%20event%20corresponds%20to%20a%20multi-bit%20error%2C%20correct%3F%3C%2FP%3E%3CP%3EI%20can%20see%20that%20the%20%3CSTRONG%3ESRAM%20non-correctable%20error%20event%20bit%3C%2FSTRONG%3E%20is%20set%20in%20SR0%2C%20but%20the%20ISR%20is%20not%20being%20triggered.%3C%2FP%3E%3CP%3ECould%20you%20please%20help%20me%20understand%20how%20to%20call%20the%20multi-bit%20error%20ISR%3F%3C%2FP%3E%3CP%3EI%20enabled%20interrupt%20notification%20for%20SRAM0%20in%20CR0%20register%20also%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2199022%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20NXP%20s32k312%20SRAM%20MultibitError%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2199022%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%2F228025%22%20target%3D%22_blank%22%3E%40Anitha7%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EUncorrectable%20faults%20trigger%20a%20CM7%20fault%20exception.%3CBR%20%2F%3EIn%20the%20example%20I%20linked%2C%20I%20enabled%20the%20Bus_Fault%20exception%2C%20but%20with%20a%20lower%20priority%20than%20the%20priority%20of%20the%20ERM%20handler%20so%20that%20the%20ERM%20handler%20is%20called%20first.%3C%2FP%3E%0A%3CP%3EI%20believe%20this%20might%20be%20the%20issue%20in%20your%20project.%3C%2FP%3E%0A%3CP%3EAlso%2C%20double-check%20the%20VTOR%20pointer%20and%20ensure%20that%20the%20ERM%20interrupt%20is%20enabled%20in%20the%20NVIC.%20You%20may%20notice%20the%20interrupt%20pending%20in%20NVIC.%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2198007%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20NXP%20s32k312%20SRAM%20MultibitError%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2198007%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%2F160001%22%20target%3D%22_blank%22%3E%40danielmartynek%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMultibit%20means%20Double%20bit%20as%20per%20RM%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Anitha7_1-1762235798762.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Anitha7_1-1762235798762.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F363851i167974A981331AAA%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Anitha7_1-1762235798762.png%22%20alt%3D%22Anitha7_1-1762235798762.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Anitha7_0-1762235788475.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Anitha7_0-1762235788475.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F363850i8D4476E6B5E4214B%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Anitha7_0-1762235788475.png%22%20alt%3D%22Anitha7_0-1762235788475.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI%20configured%20the%20system%20for%20an%20SRAM0%20as%20per%20your%20reference.%20uncorrectable%20ECC%20fault%20occur(NEC0)%20by%20setting%20the%20corresponding%20bit%20in%20the%20SRO%20register.%3C%2FP%3E%3CP%3EI%20enabled%20interrupt%20notification%20for%20NEC0%20and%20single%20bit%20event%20in%20corresponding%20CR0%20register.%3C%2FP%3E%3CP%3EAfter%20Non%20correctable%20ECC%20fault%20occurs%2C%20control%20transfers%20to%20the%20system%20call%20function%2C%20software%20not%20working%20after%20that%20until%20i%20perform%20reset.%20The%26nbsp%3B%3CSTRONG%3EERM_1_Handler%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20not%20being%20triggered%2C%20even%20though%20I%20have%20added%20it.%20For%20single-bit%20errors%2C%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EERM_0_Handler%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20triggered%20correctly.%3C%2FP%3E%3CP%3EWhat%20should%20I%20do%20to%20ensure%20that%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EERM_1_Handler%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20invoked%20when%20a%20multi-bit%20(uncorrectable)%20ECC%20error%20occurs%3F%3C%2FP%3E%3CP%3EAlso%2C%20just%20to%20confirm%20%E2%80%94%20does%20a%20multi-bit%20error(double%20bit%20error)%20always%20indicate%20an%20uncorrectable%20ECC%20fault%3F%3C%2FP%3E%3CP%3EAfter%20Non%20correctable%20ECC%20event%20occurs%20i%20need%20to%20perform%20reset%20run%20in%20ECU%20in%20normal%20mode%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2197584%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20NXP%20s32k312%20SRAM%20MultibitError%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2197584%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%2F228025%22%20target%3D%22_blank%22%3E%40Anitha7%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EWhat%20do%20you%20mean%20by%20a%20multi-bit%20error%3F%3C%2FP%3E%0A%3CP%3EThere%20is%20one%208-bit%20checksum%20for%2064bits%20(8%20bytes)%20of%20data%2C%20it%20is%20not%20possible%20to%20detect%20every%20posilble%20ECC%20error.%26nbsp%3BThere%20is%20ECC%20SECDED%20(Single%20error%20correction%2C%20Double%20error%20detection).%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3EDaniel%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2196733%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20NXP%20s32k312%20SRAM%20MultibitError%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2196733%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%2F160001%22%20target%3D%22_blank%22%3E%40danielmartynek%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EVTOR%20table%20points%20to%20flash%20memory%20only%20during%20SRAM0%20inject%26nbsp%3B%3CSPAN%3Euncorrectable%20ECC%20fault.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI%20configured%20the%20system%20for%20an%20SRAM0%20as%20per%20your%20reference%20example%20code.%20uncorrectable%20ECC%20fault%20occur%20by%20setting%20the%20corresponding%20bit%20in%20the%20SRO%20register.%3C%2FP%3E%3CP%3EI%20enabled%20interrupt%20notification%20in%20corresponding%20CR0%20register.%3C%2FP%3E%3CP%3EAfter%20uncorrectable%20ECC%20fault%20occurs%2C%20control%20transfers%20to%20the%20system%20call%20function%2C%20software%20not%20working%20after%20that%20until%20i%20perform%20reset.%20The%26nbsp%3B%3CSTRONG%3EERM_1_Handler%3C%2FSTRONG%3E%20is%20not%20being%20triggered%2C%20even%20though%20I%20have%20added%20it.%20For%20single-bit%20errors%2C%20the%20%3CSTRONG%3EERM_0_Handler%3C%2FSTRONG%3E%20is%20triggered%20correctly.%3C%2FP%3E%3CP%3EWhat%20should%20I%20do%20to%20ensure%20that%20the%20%3CSTRONG%3EERM_1_Handler%3C%2FSTRONG%3E%20is%20invoked%20when%20a%20multi-bit%20(uncorrectable)%20ECC%20error%20occurs%3F%3C%2FP%3E%3CP%3EAlso%2C%20just%20to%20confirm%20%E2%80%94%20does%20a%20multi-bit%20error%20always%20indicate%20an%20uncorrectable%20ECC%20fault%3F%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2196676%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20NXP%20s32k312%20SRAM%20MultibitError%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2196676%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%2F228025%22%20target%3D%22_blank%22%3E%40Anitha7%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EI%20updated%20the%20example%20by%20adding%20uncorrectable%20error%20injection%20into%20SRAM0.%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FExample-S32K344-EIM-ERM-DTCM-SRAM-Baremetal-v3-0-S32DS36%2Fta-p%2F2193534%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FExample-S32K344-EIM-ERM-DTCM-SRAM-Baremetal-v3-0-S32DS36%2Fta-p%2F2193534%3C%2FA%3E%3C%2FP%3E%0A%3CP%3ECan%20you%20read%20the%20VTOR%20register%20in%20your%20application%3F%3C%2FP%3E%0A%3CP%3EThe%20interrupt%20vector%20table%20must%20not%20reside%20in%20SRAM0%20when%20injecting%20an%20uncorrectable%20ECC%20fault%20into%20the%20memory.%3C%2FP%3E%0A%3CP%3EOtherwise%2C%20the%20ECC%20fault%20would%20corrupt%20the%20vector%20table%20during%20a%20fetch%20leading%20to%20another%20fault%20exception.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3EDaniel%3C%2FP%3E%3C%2FLINGO-BODY%3E