ECC ON S32K148

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

ECC ON S32K148

Jump to solution
2,049 Views
hajianik
Senior Contributor I

Hi,

I was wondering :

in my startup code ,I initialize BSS,STACK section using the byte access however It doesn't generate  an ECC error on ERM  module registers, actually it does generate  an address in ERM_EAR1 which is the upper RAM where the BSS and STACK are in the lower RAM. Why is that?

Now to avoid any ECC errors I need to initialize the whole RAM in the beginning of my start up Code.

my target is S32K148 ,the memory places the DRAM on 0x1ffe0000 to 0x2001_f000 addresses,so that's the range to initialize to avoid ECC. IS THAT CORRECT?

Thanks,

Koorosh Hajiani

0 Kudos
1 Solution
2,011 Views
hajianik
Senior Contributor I

Hi lukas,

I believe the reason that I don't generate the ECC error is:

in the start_up code ,I don't read any of the SRAM locations, I just write to them.

Please correct me if I'm wrong.

However just to be on the safe side ,I will initialize the whole RAM in the beginning of my start_up code.

 

BR,

Koorosh Hajiani

View solution in original post

0 Kudos
5 Replies
2,038 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

the RAM needs to be initialized by 32bit writes:

lukaszadrapa_0-1628178170932.png

 You can find in startup file in S32DS:

#ifdef START_FROM_FLASH

/* Init ECC RAM */

ldr r1, =__RAM_START
ldr r2, =__RAM_END

subs r2, r1
subs r2, #1
ble .LC5

movs r0, 0
movs r3, #4
.LC4:
str r0, [r1]
add r1, r1, r3
subs r2, 4
bge .LC4
.LC5:
#endif

 

Regards,

Lukas

 

0 Kudos
2,033 Views
hajianik
Senior Contributor I

Hi Lukas,

Thanks for your response.

there are 2 other questions in my post that  were not answered:

  1. in my startup code ,I initialize BSS,STACK sections using the byte access however It doesn't generate an ECC error on ERM module registers, . Why is that?
  2. my target is s32k148 and the RAM ADDRESSES for these device are:

        0x1ffe0000---0x2001efff (in your code you referred to it as ldr r1, =__RAM_START
ldr r2, =__RAM_END), do i need to initialize all the locations within that range?

in other word __RAM_START=0x1ffe0000 and __RAM_END=__RAM_END

Thanks,

 

0 Kudos
2,024 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

not sure about the first question, it would require some debugging. It's just mandatory to initialize the RAM by 32bit wide writes.

The easiest option is to initialize whole RAM in mentioned range. If you don't use whole RAM and if you want to save some time at startup, you can initialize only the RAM which will be used by your application.

Regards,

Lukas

0 Kudos
2,012 Views
hajianik
Senior Contributor I

Hi lukas,

I believe the reason that I don't generate the ECC error is:

in the start_up code ,I don't read any of the SRAM locations, I just write to them.

Please correct me if I'm wrong.

However just to be on the safe side ,I will initialize the whole RAM in the beginning of my start_up code.

 

BR,

Koorosh Hajiani

0 Kudos
2,017 Views
hajianik
Senior Contributor I

Lucas,

Thanks for your response.

Did you look at the start_up code I attached?

 

Thanks,

Koorosh

0 Kudos