S32K312 SRAM config

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32K312 SRAM config

2,942 次查看
Nitrogen8212
Contributor I

Hi,

Could you help me analyze the problem?

when I change《linker_flash_s32k312.ld》, "int_sram" start address and length, compile is successful, then debug, but jump to "HardFault_Handler".

platform: s32ds v3.4

RTD version: RTD 2.0.0

example name: FreeRTOS_Toggle_Led_Example_S32K312

before change:

Nitrogen8212_0-1713512326903.png

after change:

Nitrogen8212_1-1713512351281.png

console display:

Nitrogen8212_2-1713512498984.png

s32k312 SRAM  is 96KB, so it's not out of range.

before change, the int_sram size is 32KB, after change, the int_sram size is 64KB.

I tried to change to other size, but it is the same.

please help analyze the problem, thank you very much.

 

 

 

0 项奖励
回复
4 回复数

2,080 次查看
WenWenDar
Contributor II
I encountered the same problem. How did you solve it?
0 项奖励
回复

2,897 次查看
Senlent
NXP TechSupport
NXP TechSupport

Hi@Nitrogen8212

This may be because the configuration of the MPU has not been changed accordingly
By default, the MPU is configured and enabled in system.c. If you only modify the linker file, it may cause such an error.

0 项奖励
回复

2,825 次查看
Nitrogen8212
Contributor I

My understanding is that it is related to the register S32_MPU->RNR / RBAR / RASR.

But I can't find how to configure these registers.

Could you help me configure these registers? or tell me how to configure?

Nitrogen8212_0-1714959810787.png

 

0 项奖励
回复

2,822 次查看
Senlent
NXP TechSupport
NXP TechSupport

Hi@Nitrogen8212

there is detail description of S32_MPU register in the link below.

https://developer.arm.com/documentation/dui0646/c/Cortex-M7-Peripherals/Optional-Memory-Protection-U...

and you can refer to the default settings of S32_MPU in S32K3 startup code.

Senlent_0-1714962141746.png

 

 

0 项奖励
回复