3 Replies Latest reply on May 28, 2015 2:13 PM by jota_1939431

    Does the 20736 have a "hardware" random number generator?

      Hi all,

       

      I'm using the 20736's random number generator and I seem to be getting some repeated numbers once in a while (but more often than expected).

       

      I'm wondering if it's a pseudo-random number generator (software, needs manual seeding), instead of a hardware one (which does self-seeding).

       

      The problem is really when, for example, I use 1000 different devices to generate their own 32-bit ID numbers.  When the central retrieves their IDs, we noticed that some ID numbers were generated by a few devices.

       

      Example:

       

      Id 0x12345678 only 1 device

      ...

      Id 0x9ABCDEF only 1 device

      ...

      Id 0x34FE0207 was generated by 4 devices

      ...

      Id 0xFF810ADD was generated by 3 devices

      ...

      etc

       

      In the end, the central reported that there only about 700 unique IDs among those 1000 devices.

       

      Is this an expected limitation or am I doing something wrong?

       

      Here's what I did:

       

      UINT32 random_number;

       

      ulp_rand(&random_number, 1);

       

      Thanks!

       

      Gil

       

      Message was edited by: Guilherme de Paula