S32K142: Flash Partition Anomaly

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

S32K142: Flash Partition Anomaly

2,420件の閲覧回数
ShaoTianzhi
Contributor II

“I referred to NXP’s Flash partition sample code and wrote the following code. When executed on S32K146, it works normally and can perform partitioning. However, when debugging on S32K142, the program stops at the execution of [ MSCM->OCMDR[0u] |= MSCM_OCMDR_OCM1(0x3u); ]. After clicking break and then go, it continues to execute without crashing. When not debugging, the program also stops here. I would like to ask why this is happening?”

ShaoTianzhi_0-1704176751678.pngShaoTianzhi_1-1704176838437.png

 

0 件の賞賛
返信
7 返答(返信)

2,397件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@ShaoTianzhi

Could you please to modified the highlight part to S32K142 and then try again.

Senlent_0-1704248906953.png

I could not find any more porblem from the picture you provided, so if this still can't work normally, you may need to test the demo code in IDE:flash_partitioning_s32k142

0 件の賞賛
返信

2,390件の閲覧回数
ShaoTianzhi
Contributor II

Hi@Senlent

I apologize for submitting a picture of another project. In fact, what I wrote here is [#ifdef S32K142_SERIES]. My code was written with reference to [IDE:flash_partitioning_s32k142], but I just omitted the step of erasing ALL Blocks.

ShaoTianzhi_0-1704330730925.png

My confusion is why the code stops at the position of modifying the register.

0 件の賞賛
返信

2,375件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@ShaoTianzhi

I don't find any problems from the pictures you provided. I would like to ask if your S32K142 has been partitioned before. If it has been partitioned, please erase the partition first and try again.
If you still have problems, I need you to provide sample project code and I will check it for you

0 件の賞賛
返信

2,334件の閲覧回数
ShaoTianzhi
Contributor II

Hi@Senlent

sorry for the later reply,

I have put the program in the attachment, please check.

0 件の賞賛
返信

2,322件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@ShaoTianzhi

I tried mapping these operations to RAM and it seems to be no problem for me.

Senlent_1-1704941871253.png

Senlent_0-1704941038597.png

 

 

0 件の賞賛
返信

2,311件の閲覧回数
ShaoTianzhi
Contributor II

Hi@Senlent

I have tried according to your method, but when using IAR Debug, a new problem occurred. The code is stuck at the position where the OCMDR register is written. Clicking Break prompts that the CPU did not stop.

ShaoTianzhi_0-1705030223173.png

 

0 件の賞賛
返信

2,298件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@ShaoTianzhi

I can't run the IAR project. You can test the routine on S32 DS so that I can easily reproduce your problem.
You can check the x.map file to see if the function is correctly mapped into RAM

0 件の賞賛
返信