SparkFun_ATECCX08a_Arduino_Library icon indicating copy to clipboard operation
SparkFun_ATECCX08a_Arduino_Library copied to clipboard

Latency calling random(max) successively

Open zacharytomlinson opened this issue 5 months ago • 0 comments

Hello, I am using the random(max) function in order to generate a value-bounded set of approximately 100, 32 byte unsigned integers. It works very consistently, but unfortunately it takes 30 to 31ms to execute that function. When done successively to populate the target buffer this is abnormally slow. Searching through the source I noticed this in the xxx_xxxx_Library.cpp file Line 330 (the updateRandom32Bytes implementation): delay(23); // time for IC to process command and exectute Has this been optimized at all? My thought was to reduce that significantly and try and increase the I2C clock rate to speed things up. Thanks!

zacharytomlinson avatar Aug 04 '25 20:08 zacharytomlinson