Content originally posted in LPCWare by MikeSimmonds on Fri Sep 14 16:26:32 MST 2012
[SIZE=2][FONT=Tahoma]One thought that springs to mind is to save the last random number generated to one of the RTC general purpose battery backed up registers; assuming that your design includes a battery for the RTC.
That way, at each reboot your pseudo-random generator will carry on from where it left off. I.e. the random number sequence will 'start' with a new number at every reset.
If you don't have a battery, then you are stuffed and will have to base the seed on something that [I]is[/I] inherantly random from off-chip.
If your application includes any user intervention (or comms etc.), you could get the delay in the finest granularity you can manage from initial setup to the first external input and derive your seed therefrom. (The external input is the off-chip random kick-start.)
You will have to assess how 'random' the external event actually is and decide if it has an acceptable variation.
Regards, Mike [/FONT][/SIZE]