How to read uninitialized ECC RAM in MPC5606

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

How to read uninitialized ECC RAM in MPC5606

Jump to solution
2,768 Views
lowpy
Contributor I

Hello,

 

I would like to read areas in the RAM memory of an MPC5606 after power-up, before it gets initialized for correct ECC functioning.

I have read the speciffication for the ECC SRAM module but still it is not clear to me if what I am trying to do is possible at all.

 

A quick test with a simple project generated with the CodeWarrior for MCU wizzard shows that the entire RAM is initialized after startup, after the default startup code was executed.

I did not check yet how it looks before this.

 

If someone has experience with something like this I would appreaciate any hint on if and how can this be achieved.

 

Thanks in advance!

Labels (1)
0 Kudos
Reply
1 Solution
2,277 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

As soon as you read uninitialized SRAM you will get check stop reset because of multibit ECC error fauls.

Peter

View solution in original post

0 Kudos
Reply
8 Replies
2,277 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

To read uninitialized SRAM is possible but it will return to you only multibit ECC errors.

As the SRAM content is random after reset and the data in SRAM do not match ECC in SRAM,

Peter

0 Kudos
Reply
2,277 Views
lowpy
Contributor I

Hello Peter,

Thank you for your fast reply.

I do not mind if the ECC will report errors as interrupts or flags as long as the data that I read from RAM is not affected in any way by error correction.

So this is my actual concern. Will the data that I read from RAM before initializing be raw, untouched data or data with some undefined ECC correction ?

I only need to to this once at startup and after this I will initialize RAM.

Lowpy

0 Kudos
Reply
2,277 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

Yes, there will be random data which do not match ECC in SRAM.

Could you tell me why you need to read uninitialized SRAM and trigger multiple ECC errors? never heard of any use case where this is required.

Peter

0 Kudos
Reply
2,277 Views
lowpy
Contributor I

Hello Peter,

I need to generate random numbers in my system and I use a pseudo random number generator (PRNG) in the absence of a HW module that can directly generate random numbers. The PRNG however needs a random seed otherwise after system power-on it will generate the same number sequence each time. The simplest source of randomness at power-up is the RAM and this is why I need to read uninitialized RAM.

In this power-on phase it does not matter if there are ECC errors as long as random data can be read from RAM and if the system will be fine after initializing the RAM. Do you see any problems in this handling? I am new to MPC5x so I might be overlooking some things.

Thanks for your response!

0 Kudos
Reply
2,278 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

As soon as you read uninitialized SRAM you will get check stop reset because of multibit ECC error fauls.

Peter

0 Kudos
Reply
2,277 Views
lowpy
Contributor I

Hello Peter,

Ok, I see now why you were wondering why I wanted to do this.

So it is actually quite impossible to achieve what I intend to do. :smileysad:

Are there any possible sources of randomness on the chip without the need of external HW?

0 Kudos
Reply
2,277 Views
petervlna
NXP TechSupport
NXP TechSupport

You can read for example the core registers, but the number wont be fully random. It will represent the defined rampup voltage and some noise on core registers.

The number will oscillate around some threshold.

0 Kudos
Reply
2,277 Views
lowpy
Contributor I

Hello Peter,

Thank you for clariffying things for me and for this suggestion I will give it a try.

Lowpy

0 Kudos
Reply