xmc1400 PRNG seeding

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
I want to use the XMC1400's PRNG in my application but I need to get a unique seed value for every power up.

Has anyone found a good way to seed the PRNG?

I briefly looked at using the VADC. I'm using the xmc1400 boot kit and the example program using p2.5 connected to a pot works fine.
However trying to change it to use an unconnected channel was daunting. I simply wanted to read the ADC connected to a different pin.
It seems like the peripheral can do all kinds of complex operations, but just a simple read ??? I could not find a good example.

I also considered using the on board temperature sensor, but have not attempted it yet/
0 Likes
4 Replies
User12775
Level 5
Level 5
First solution authored First like received
Could not understand your problem.
Can't read VADC from some port, or can't find a good seed for PRNG?
0 Likes
Not applicable
Has anyone found a good way to seed the PRNG?
0 Likes
User13817
Level 3
Level 3
In that case I would suggest you to use the internal temperature sensor as a seed. The problem is that it doesn't mean you will have a unique seed every start up unless you create some routine to check if it was previouslly used.
To do that, you have to store previouslly values in a non volatile memory. I don't like the idea of using a non volatile memory to do this, but if you really need a unique value this is one possiblity.
0 Likes
User12775
Level 5
Level 5
First solution authored First like received
If you really need a TRNG, XMC1x is not a good choice.
0 Likes