S32K312 SRAM config

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K312 SRAM config

560 Views
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 Kudos
Reply
3 Replies

515 Views
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 Kudos
Reply

443 Views
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 Kudos
Reply

440 Views
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 Kudos
Reply