DeeFuse
DeeFuse
1.27.0 produces the same file (the template hasn't been changed since 2020) [sd_diskio_dma_rtos_template_bspv1.c](https://github.com/STMicroelectronics/STM32CubeF4/blob/3d6be4bd406f275728e0a321cc371c62a3100533/Middlewares/Third_Party/FatFS/src/drivers/sd_diskio_dma_rtos_template_bspv1.c) This problem is related to #2
Unfortunately I got no AVR board to test the entropy. I can imagine that the result of the AD conversion will fluctuate in a range 0+X < n < 1023...
I had a look into the [hydro_hash_update](https://github.com/jedisct1/libhydrogen/blob/4a477649e679aff15480f88d8dc93913540bd70e/impl/hash.h#L2) function, it seems that the input is XORed with the state and then fed into the `gimli_core_u8` every gimli_RATE (16) bytes. I could...
I can't give a definite answer on the number of unbiased bits from the code alone. I'll look if i can find an AVR arduino in my stash to generate...
A basic test could be to simply create the average of all random uint8_t outputs of the generator function and observe if it converges towards 127. An other option would...
I'd say that the 0 readings are expected, ever 2nd itteration the ADC gets grounded to be able to recharge it. we could optimize the code to ground and recharge...
I'm doubt that 1 instruction is not enough to discharge the internal capacitor to have a sufficient long charge time and range for a good distribution > ADMUX = 0b01001111;...
I see that you removed the ADC [converisontime "randomisation"](https://github.com/jedisct1/libhydrogen/blob/878e59d1ca24d12ce07e695baa0fc831fbdb925f/impl/random/avr.h#L44). With that in place the randomnes of the readings could be increased.
I've tested the codes with a ATmega2561 in a comercial appliance I had at hand. Following porblems emerged: 1. The V_BG ADMUX settings are different (compared to the ATmega328) 2....
The AVR random implementation relies on [TIMER1](https://github.com/jedisct1/libhydrogen/blob/4a477649e679aff15480f88d8dc93913540bd70e/impl/random/avr.h#L35) as a source of random data. This can lead to "predictable" or "similar" states after boot. A better source of randomnes would be...