DWORD GenerateRandomDWORD();
This function generates a random 32-bit integer. It collects randomness by comparing the A/D converter's internal R/C oscillator clock with our main system clock. By passing collected entropy to the LFSRSeedRand()/LFSRRand() functions, the output is normalized (deskewed) in the hopes of meeting statistical randomness tests.
None
Random 32-bit number.
This function uses the A/D converter (and so you must disable interrupts if you use the A/D converted in your ISR). The LFSRRand() function will be reseeded, and Timer0 (PIC18) and Timer1 (PIC24, dsPIC, and PIC32) will be used. TMR#H:TMR#L will have a new value. Note that this is the same timer used by the Tick module.
This function times out after 1 second of attempting to generate the random DWORD. In such a case, the output may not be truly random. Typically, this function executes in around 500,000 instruction cycles.
The intent of this function is to produce statistically random and cryptographically secure random number. Whether or not this is true on all (or any) devices/voltages/temperatures is not tested.