From: Keith Packard Date: Thu, 28 Jan 2016 21:58:43 +0000 (-0800) Subject: altos/chaoskey: Delay ADC reading for 250ms at startup X-Git-Tag: 1.6.3~2^2~112 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=35407e664886bed21dcef7764843aac03be8490c altos/chaoskey: Delay ADC reading for 250ms at startup This lets the HV supply stabilize before we start sampling values. Signed-off-by: Keith Packard --- diff --git a/src/drivers/ao_trng_send.c b/src/drivers/ao_trng_send.c index 64c016b2..99994900 100644 --- a/src/drivers/ao_trng_send.c +++ b/src/drivers/ao_trng_send.c @@ -72,6 +72,11 @@ ao_trng_send(void) ao_crc_reset(); + /* Delay long enough for the HV power supply to stabilize so that the + * first bits we read aren't of poor quality + */ + ao_delay(AO_MS_TO_TICKS(250)); + for (;;) { if (ao_send_raw()) { ao_led_on(AO_LED_TRNG_RAW);