Standby RAM initialization fails S32K324

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

Standby RAM initialization fails S32K324

676 Views
jeevanthomas
Contributor II

My project uses an S32K324 controller.

I'm facing an issue with standalone SW run without debugger.

SW intends to use Standby RAM of the S32K3 MCU.

After hot attaching the debugger, it's found that the cause of SW stuck is MemManageFault exception.

  • MMARVALID bit is SET in MMFSR register
  • MMAR register shows address of the starting address [0x20400900] of Standby RAM defined in linker file

Per the S32K3xx reference manual:

  • first 32K of SRAM can be used as Standby RAM
  • After a chip power-on-reset, RAM must be initialized to a known value using a 64-bit master before any 32-bit read / write operations can be performed

Our SW build would like to use 1K of Standby RAM from the following address and size:

[standby_ram : ORIGIN = 0x20400900, LENGTH = 0x00000400]

We use the following code to initialize the Standby RAM as quoted in the S32K3 reference manual:

RamMemPtr2 = (uint64 *)0x20400900;
if ResetReasonB == McuConf_McuResetReasonConf_MCU_POWER_ON_RESET )
{
     for index =0 index<96index++ )
    {
        RamMemPtr2[index] = 0U;
    }
 }
 
We are unable to use the standby RAM starting from location address 0x20400000 because the Vector FBL package we use require 1KB of space to load the flash driver.
 
S32K3 manual does not mention explicitly about starting the Standby RAM initialization from address 0x20400000.
 
Hence, I'm assuming that it's permissible to use a memory region anywhere within the first 32K as starting address. 
Has anyone faced the above issue with Standby RAM?
Any thoughts or clue on what's going wrong?
0 Kudos
Reply
1 Reply

605 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @jeevanthomas,

I apologize for the late reply! There was an issue with the community tool tracker, and I was under the impression this post was already answered.

You are correct, there should be no problem declaring Standby RAM anywhere in between the 32KB. I am not exactly sure what may be wrong within your project, but I've tested the Standby RAM in the origin you've shared (with the same length) and I can declare and add a counter correctly.

Could you please test the attached project? It is based in S32DS v3.6 and RTD 6.0.0. I've used our internal evaluation board for S32K324, but wake-up is with internal RTC, so pins should not matter, you can simply attach to the running target once programmed and check the variable "RunStandbyCounter0".

Best regards,
Julián

0 Kudos
Reply