Read uninitialized SRAM values
Hello and thanks in advance for reading my post.
I am currently working on my dissertation, trying to implement a digital signing algorithm on a Arm Cortex-M0+ microprocessor. I'm using a NUCLEO-G0B1RE board with a stm32 with the same series. This board does not come with a TRNG peripheral and I don't want to use a packaged one, as I'm trying to understand the process of crceating an RNG as well.
From some posts I have read (either on this forum or other ones), it seems that uninitialized SRAM is a good starting point for my entropy source. I'm also taking into consideration using time jitter between two oscillators (mainly the 32 kHz +- 5% RC oscillator and the PLL block).
I use VSCode and I wrote my own linker script and startup code.
I have created a noinit section that loads into SRAM:
.noinit (NOLOAD) : {
*(.noinit)
} >SRAMSRAM is a memory zone which has the origin and length based on the memory organization chapter in the reference manual and is according to my device specifications:
SRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 144KI have also created a volatile array of unsigned integers to be loaded in the noinit section:
volatile uint8_t au8Arr[1024] __attribute__((section(".noinit")));When using Cortex-Debugger to check the values inside au8Arr in the Reset_Handler, there seems to be very little if any modification at all in bytes.
It seems that SRAM is retained even on longer power cycles (1min - 10min).
My question is how can I make the retention period much smaller (if none at all) or how can I adapt to these behaviour?
