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!
Solved! Go to Solution.
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,
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.
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.
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!
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?
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.