S32K144 ERM flag abnormal settings

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

S32K144 ERM flag abnormal settings

Jump to solution
1,810 Views
LijieDu
Contributor II

LijieDu_0-1753262292296.png

When i am debug the code, SRAM_U double and single bit error flag will be set and the fault address is weird!!! The maximum available RAM address is 0x20007000 and the fault address is bigger than that! I am so confused

0 Kudos
Reply
1 Solution
1,765 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @LijieDu,

Please close the Memory and Variable views that are currently monitoring the SRAM.

 

Regards,

Daniel

View solution in original post

0 Kudos
Reply
6 Replies
1,797 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @LijieDu,

Do you disable the error injection in the ERM interrupt?

EIMCR[GEIEN] = 0.

In the SRAM_U region, there is the Stack located.

The EIM must be disabled before the Stack is read.

 

Regards,

Daniel

0 Kudos
Reply
1,774 Views
LijieDu
Contributor II

Yes, I have disabled the EIMCR[GEIEN] in the erm handler function.

By the way, When I just run the code without debug, it can run normal, but with debug tools and debug the code, it always generate the ram ecc fault, or just pause the code and continue to run it , will generate the fault too.

0 Kudos
Reply
1,766 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @LijieDu,

Please close the Memory and Variable views that are currently monitoring the SRAM.

 

Regards,

Daniel

0 Kudos
Reply
1,731 Views
LijieDu
Contributor II

WOw that's it! Thanks ~

By the way, another question:

when I am doing the ram test below in startup phase, it always resets in step3, I can't find the reason,

pls help me/(ㄒoㄒ)/~~

-----------------------↓----------------↓-----------------------------------

;;RAM TEST (__RAM_START=0x1FFF9000 /__RAM_END=0x20006FFF)
;;STEP 1 - Write background 00 with addresses increasing
LDR R1, =__RAM_START
LDR R2, =__RAM_END

SUBS R2, R2, R1
SUBS R2, #1
BLE .TS1_2

MOVS R0, #0
MOVS R3, #4
.TS1_1: ;TEST STEP 1.1
STR R0, [R1]
ADD R1, R1, R3
SUBS R2, #4
BGE .TS1_1
.TS1_2: ;TEST STEP 1.1

;;STEP 2 - Verify background and write inverted background 0xFF with addresses increasing
LDR R1, =__RAM_START
LDR R2, =__RAM_END

SUBS R2, R2, R1
SUBS R2, #1
BLE .TS2_2

LDR R3, =0xFFFFFFFF
.TS2_1: ;TEST STEP 2.1
LDR R0, [R1]
CMP R0, #0
BNE Fst_RAMTSTFAIL

STR R3, [R1]
ADDS R1, R1, #4
SUBS R2, #4
BGE .TS2_1
.TS2_2: ;TEST STEP 2.2

;;STEP 3 - Verify inverted background 0xFF and write background 0x00 with addresses increasing
LDR R1, =__RAM_START
LDR R2, =__RAM_END

SUBS R2, R2, R1
SUBS R2, #1
BLE .TS3_2

MOVS R4, #0
.TS3_1: ;TEST STEP 3.1
LDR R0, [R1]
LDR R3, =0xFFFFFFFF
CMP R0, R3
BNE Fst_RAMTSTFAIL

STR R4, [R1]
ADDS R1, R1, #4
SUBS R2, #4
BGE .TS3_1
.TS3_2: ;TEST STEP 3.2

;;STEP 4 - Verify background 0x00 and write inverted background 0xFF with addresses

....

;;STEP 5 - Verify inverted background and write background with addresses decreasing

....

 

0 Kudos
Reply
1,655 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @LijieDu,

Can you create a new thread, it has nothing to do with the initial issue here.

 

Thank you

0 Kudos
Reply
1,613 Views
LijieDu
Contributor II

Yes, of course, thank you for your answer.

best wishes!

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2139229%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K144%20ERM%20flag%20abnormal%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2139229%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22LijieDu_0-1753262292296.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22LijieDu_0-1753262292296.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F349066i4C9EAFE4F93EBCA1%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22LijieDu_0-1753262292296.png%22%20alt%3D%22LijieDu_0-1753262292296.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EWhen%20i%20am%20debug%20the%20code%2C%20SRAM_U%20double%20and%20single%20bit%20error%20flag%20will%20be%20set%20and%20the%20fault%20address%20is%26nbsp%3Bweird%EF%BC%81%EF%BC%81%EF%BC%81%26nbsp%3BThe%20maximum%20available%20RAM%20address%20is%200x20007000%20and%20the%20fault%20address%20is%20bigger%20than%20that!%20I%20am%20so%20confused%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2142090%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K144%20ERM%20flag%20abnormal%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2142090%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EYes%2C%20of%20course%2C%20thank%20you%20for%20your%20answer.%3C%2FP%3E%3CP%3Ebest%20wishes!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2141483%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K144%20ERM%20flag%20abnormal%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2141483%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%2F209239%22%20target%3D%22_blank%22%3E%40LijieDu%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3ECan%20you%20create%20a%20new%20thread%2C%20it%20has%20nothing%20to%20do%20with%20the%20initial%20issue%20here.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThank%20you%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2141160%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K144%20ERM%20flag%20abnormal%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2141160%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EWOw%20that's%20it!%20Thanks%20~%3C%2FP%3E%3CP%3EBy%20the%20way%2C%20another%20question%3A%3C%2FP%3E%3CP%3Ewhen%20I%20am%20doing%20the%20ram%20test%20below%20in%20startup%20phase%2C%20it%20always%20resets%20in%20%3CSTRONG%3Estep3%3C%2FSTRONG%3E%2C%20I%20can't%20find%20the%20reason%2C%3C%2FP%3E%3CP%3Epls%20help%20me%2F(%E3%84%92o%E3%84%92)%2F~~%3C%2FP%3E%3CP%3E-----------------------%E2%86%93----------------%E2%86%93-----------------------------------%3C%2FP%3E%3CP%3E%3B%3B%3CSTRONG%3ERAM%20TEST%20(__RAM_START%3D0x1FFF9000%20%2F__RAM_END%3C%2FSTRONG%3E%3D%3CSTRONG%3E0x20006FFF)%3C%2FSTRONG%3E%3CBR%20%2F%3E%3B%3BSTEP%201%20-%20Write%20background%2000%20with%20addresses%20increasing%3CBR%20%2F%3ELDR%20R1%2C%20%3D__RAM_START%3CBR%20%2F%3ELDR%20R2%2C%20%3D__RAM_END%3C%2FP%3E%3CP%3ESUBS%20R2%2C%20R2%2C%20R1%3CBR%20%2F%3ESUBS%20R2%2C%20%231%3CBR%20%2F%3EBLE%20.TS1_2%3C%2FP%3E%3CP%3EMOVS%20R0%2C%20%230%3CBR%20%2F%3EMOVS%20R3%2C%20%234%3CBR%20%2F%3E.TS1_1%3A%20%3BTEST%20STEP%201.1%3CBR%20%2F%3ESTR%20R0%2C%20%5BR1%5D%3CBR%20%2F%3EADD%20R1%2C%20R1%2C%20R3%3CBR%20%2F%3ESUBS%20R2%2C%20%234%3CBR%20%2F%3EBGE%20.TS1_1%3CBR%20%2F%3E.TS1_2%3A%20%3BTEST%20STEP%201.1%3C%2FP%3E%3CP%3E%3B%3BSTEP%202%20-%20Verify%20background%20and%20write%20inverted%20background%200xFF%20with%20addresses%20increasing%3CBR%20%2F%3ELDR%20R1%2C%20%3D__RAM_START%3CBR%20%2F%3ELDR%20R2%2C%20%3D__RAM_END%3C%2FP%3E%3CP%3ESUBS%20R2%2C%20R2%2C%20R1%3CBR%20%2F%3ESUBS%20R2%2C%20%231%3CBR%20%2F%3EBLE%20.TS2_2%3C%2FP%3E%3CP%3ELDR%20R3%2C%20%3D0xFFFFFFFF%3CBR%20%2F%3E.TS2_1%3A%20%3BTEST%20STEP%202.1%3CBR%20%2F%3ELDR%20R0%2C%20%5BR1%5D%3CBR%20%2F%3ECMP%20R0%2C%20%230%3CBR%20%2F%3EBNE%20Fst_RAMTSTFAIL%3C%2FP%3E%3CP%3ESTR%20R3%2C%20%5BR1%5D%3CBR%20%2F%3EADDS%20R1%2C%20R1%2C%20%234%3CBR%20%2F%3ESUBS%20R2%2C%20%234%3CBR%20%2F%3EBGE%20.TS2_1%3CBR%20%2F%3E.TS2_2%3A%20%3BTEST%20STEP%202.2%3C%2FP%3E%3CP%3E%3B%3BSTEP%203%20-%20Verify%20inverted%20background%200xFF%20and%20write%20background%200x00%20with%20addresses%20%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3Eincreasing%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3ELDR%20R1%2C%20%3D__RAM_START%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3ELDR%20R2%2C%20%3D__RAM_END%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3ESUBS%20R2%2C%20R2%2C%20R1%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3ESUBS%20R2%2C%20%231%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3EBLE%20.TS3_2%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3EMOVS%20R4%2C%20%230%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3E.TS3_1%3A%20%3BTEST%20STEP%203.1%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3ELDR%20R0%2C%20%5BR1%5D%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3ELDR%20R3%2C%20%3D0xFFFFFFFF%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3ECMP%20R0%2C%20R3%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3EBNE%20Fst_RAMTSTFAIL%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3ESTR%20R4%2C%20%5BR1%5D%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3EADDS%20R1%2C%20R1%2C%20%234%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3ESUBS%20R2%2C%20%234%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3EBGE%20.TS3_1%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3E.TS3_2%3A%20%3BTEST%20STEP%203.2%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3B%3BSTEP%204%20-%20Verify%20background%200x00%20and%20write%20inverted%20background%200xFF%20with%20addresses%3C%2FP%3E%3CP%3E....%3C%2FP%3E%3CP%3E%3B%3BSTEP%205%20-%20Verify%20inverted%20background%20and%20write%20background%20with%20addresses%20decreasing%3C%2FP%3E%3CP%3E....%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2140681%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K144%20ERM%20flag%20abnormal%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2140681%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F209239%22%20target%3D%22_blank%22%3E%40LijieDu%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EPlease%20close%20the%20Memory%20and%20Variable%20views%20that%20are%20currently%20monitoring%20the%20SRAM.%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%3CLINGO-SUB%20id%3D%22lingo-sub-2140412%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K144%20ERM%20flag%20abnormal%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2140412%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EYes%2C%20I%20have%20disabled%20the%26nbsp%3B%3CSPAN%3EEIMCR%5BGEIEN%5D%20in%20the%20erm%20handler%20function.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EBy%20the%20way%2C%20When%20I%20just%20run%20the%20code%20without%20debug%2C%20it%20can%20run%20normal%2C%20but%20with%20debug%20tools%20and%20debug%20the%20code%2C%20it%20always%20generate%20the%20ram%20ecc%20fault%2C%20or%20just%20pause%20the%20code%20and%20continue%20to%20run%20it%20%2C%20will%20generate%20the%20fault%20too.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2139408%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K144%20ERM%20flag%20abnormal%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2139408%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F209239%22%20target%3D%22_blank%22%3E%40LijieDu%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EDo%20you%20disable%20the%20error%20injection%20in%20the%20ERM%20interrupt%3F%3C%2FP%3E%0A%3CP%3EEIMCR%5BGEIEN%5D%20%3D%200.%3C%2FP%3E%0A%3CP%3EIn%20the%20SRAM_U%20region%2C%20there%20is%20the%20Stack%20located.%3C%2FP%3E%0A%3CP%3EThe%20EIM%20must%20be%20disabled%20before%20the%20Stack%20is%20read.%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