projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f2d3202
)
altos/chaoskey: Delay ADC reading for 250ms at startup
author
Keith Packard
<keithp@keithp.com>
Thu, 28 Jan 2016 21:58:43 +0000
(13:58 -0800)
committer
Keith Packard
<keithp@keithp.com>
Thu, 28 Jan 2016 21:58:43 +0000
(13:58 -0800)
This lets the HV supply stabilize before we start sampling values.
Signed-off-by: Keith Packard <keithp@keithp.com>
src/drivers/ao_trng_send.c
patch
|
blob
|
history
diff --git
a/src/drivers/ao_trng_send.c
b/src/drivers/ao_trng_send.c
index 64c016b2da6949cf72333f29345b0dd47b84d48e..99994900aadbc3d1f8b7d2c174967fd21a2ef3f6 100644
(file)
--- 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);