S32K312 After integrating SCST, the SCST test fails the first run and passes all subsequent times

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

S32K312 After integrating SCST, the SCST test fails the first run and passes all subsequent times

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

I am using S32K312 chip to integrate SCST, the compiler used is GHS 20220104, the compilation, link attributes, and MPU are all configured according to the manual, and the macro configuration in m7_scst_configuration.h is as follows:

Yongxingjia_0-1717137630461.png

S32K312 After integrating SCST, the SCST m7_scst_exception_usage_fault_test test fails the first run and passes all subsequent times

The debugging situation is as follows:

The first run m7_scst_execute_core_tests(0, 0); The result is wrong

Yongxingjia_1-1717138469712.png

2nd run m7_scst_execute_core_tests (0, 0); The result is correct

Yongxingjia_2-1717138480952.png

The first run m7_scst_execute_core_tests(0, 49); The result is wrong

Yongxingjia_3-1717138614320.png

2nd run m7_scst_execute_core_tests (0, 49); The result is correct

Yongxingjia_4-1717138643492.pngYongxingjia_5-1717138655203.png

What are the possible reasons for this happening and how to fix it?

Thank you!

 

0 件の賞賛
返信
1 解決策
464件の閲覧回数
martinkaspar-r3
NXP Employee
NXP Employee
Hello,
It looks like the global variables, which are placed in m7_scst_test_shell_data section, are not properly initialized.
Especially m7_scst_fault_inject_test_index variable shall be initialized to 0xFFFFFFFF.

If this variable is initialized to 0 before m7_scst_execute_core_tests function is called, then fault is injected to test with index 0 -> m7_scst_exception_usage_fault_test, and wrong signature is returned. Variable m7_scst_fault_inject_test_index is then reinitialized to 0xFFFFFFFF, so other runs returns the correct signature.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
465件の閲覧回数
martinkaspar-r3
NXP Employee
NXP Employee
Hello,
It looks like the global variables, which are placed in m7_scst_test_shell_data section, are not properly initialized.
Especially m7_scst_fault_inject_test_index variable shall be initialized to 0xFFFFFFFF.

If this variable is initialized to 0 before m7_scst_execute_core_tests function is called, then fault is injected to test with index 0 -> m7_scst_exception_usage_fault_test, and wrong signature is returned. Variable m7_scst_fault_inject_test_index is then reinitialized to 0xFFFFFFFF, so other runs returns the correct signature.
0 件の賞賛
返信
456件の閲覧回数
Yongxingjia
Contributor II

That's really the reason, thank you very much!

0 件の賞賛
返信