diff options
| author | robert-hh <robert@hammelrath.com> | 2023-01-24 20:36:19 +0100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-02-21 23:15:29 +1100 |
| commit | 76cf98c35b81dded1dc623d07f25e28713a16b63 (patch) | |
| tree | aadcfff5997f4d24522d34bc973eb6e47d165817 /tests/micropython/heapalloc_bytesio.py.exp | |
| parent | 7e0b1bc95dffad4056ab6a1d6bc54f51cb6a6002 (diff) | |
samd/mcu: Implement a hardware seed for the SAMD21 random module.
By using the phase jitter between the DFLL48M clock and the FDPLL96M clock.
Even if both use the same reference source, they have a different jitter.
SysTick is driven by FDPLL96M, the us counter by DFLL48M. As a random
source, the us counter is read out on every SysTick and the value is used
to accumulate a simple multiply, add and xor register. According to tests
it creates about 30 bit random bit-flips per second. That mechanism will
pass quite a few RNG tests, has a suitable frequency distribution and
serves better than just the time after boot to seed the PRNG.
Diffstat (limited to 'tests/micropython/heapalloc_bytesio.py.exp')
0 files changed, 0 insertions, 0 deletions
