MemManage and HardFault come up when debugging, so it doesn't work

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

MemManage and HardFault come up when debugging, so it doesn't work

ソリューションへジャンプ
1,266件の閲覧回数
bohee2
Contributor II

Hello.

I'm currently using the s32k324 board.
I'm running a simple example code, but I get the following two errors while debugging


MemManage: The processor attempted an instruction fetch from a location that does not permit execution.
HardFault: A fault has been escalated to a hard fault.

Can you tell me the solution?

Thank you.

0 件の賞賛
返信
1 解決策
1,225件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @bohee2,

In system.c of the RTD version, the MPU region 2 is not configured on S32K324.

danielmartynek_0-1739523808523.png

As you can see above, S32K324 macro is missing.

Solution is to add S32K324 there so that RASR[2] is configured 

rasr[2]=0x070B0027UL;

 

Regards,

Daniel

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,253件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @bohee2,

Which revision of the RTD do you use?

There have been some issues with the MPU configuration in system.c for some S32K3xx derivatives.

In general, MemManage faults are caused by MPU access violation.

You can disable the MPU in system.c

 

Regards,

Daniel

0 件の賞賛
返信
1,251件の閲覧回数
bohee2
Contributor II

Thank you for your answer.

RTD is using 3.0.0 version. I will attach the picture.

bohee2_0-1739444517454.png

 


Is this an error caused by the RTD version? I am asking because such an error does not occur when it is 5.0.0.

Thank you

0 件の賞賛
返信
1,226件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @bohee2,

In system.c of the RTD version, the MPU region 2 is not configured on S32K324.

danielmartynek_0-1739523808523.png

As you can see above, S32K324 macro is missing.

Solution is to add S32K324 there so that RASR[2] is configured 

rasr[2]=0x070B0027UL;

 

Regards,

Daniel

0 件の賞賛
返信
1,194件の閲覧回数
bohee2
Contributor II

Thank you!
Thanks to you, I solved it

0 件の賞賛
返信