S32K144 RAM test failed in startup phase

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K144 RAM test failed in startup phase

ソリューションへジャンプ
544件の閲覧回数
LijieDu
Contributor II

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 件の賞賛
返信
1 解決策
449件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @LijieDu,

The WDOG is enabled by default out of reset:

danielmartynek_0-1753946893835.png

It is disabled in the Startup:

danielmartynek_1-1753946992275.png

 

Regards,

Daniel

 

 

元の投稿で解決策を見る

0 件の賞賛
返信
7 返答(返信)
513件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @LijieDu,

Do you know the address where the MCU resets?

If the MCU is resetting unexpectedly, it’s likely due to a core lockup, which sets the RCM_SRS[LOCKUP] flag. This typically happens when a fault (such as a HardFault) occurs and there is no valid HardFault_Handler implemented in your project.

To improve debugging and catch these exceptions more effectively, I recommend implementing a custom HardFault_Handler. 

 

Regards,

Daniel

0 件の賞賛
返信
493件の閲覧回数
LijieDu
Contributor II

Hi @danielmartynek 

Thanks for your answer, I have implemented a HardFault handler and it didn't run to it.

The code is used on s32k118 and I reuse it on s32k144,  the difference is RAM_START and RAM_END definition.

Is there something wrong with the code or I just ignore something else with s32k144?

0 件の賞賛
返信
489件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @LijieDu,

Can you still identify the reset source?

0 件の賞賛
返信
473件の閲覧回数
LijieDu
Contributor II

I find the reset cause, but still confused about it, I even didn't config the wdog.

LijieDu_0-1753931796098.png

 

0 件の賞賛
返信
450件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @LijieDu,

The WDOG is enabled by default out of reset:

danielmartynek_0-1753946893835.png

It is disabled in the Startup:

danielmartynek_1-1753946992275.png

 

Regards,

Daniel

 

 

0 件の賞賛
返信
447件の閲覧回数
LijieDu
Contributor II

Hi @danielmartynek  

I do the ram test before disable the wdog, so it resets!

It didn't happen on s32k118(ram size is 23k), because the ram to be tested is less than 32k144(ram size is 64k).

I disable the wdog before ram test, and it run normally

thanks bro

0 件の賞賛
返信
475件の閲覧回数
LijieDu
Contributor II

Hi @danielmartynek  

It is so hard to find the reset cause! That is why I am seeking help here

When executing the reset handler (reset vector table), the MCU is blank, and then it initializes registers R1-R12 and starts the RAM test. Nothing else is done.

0 件の賞賛
返信