aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2020-01-23 13:09:53 +0100
committerLinus Nordberg <linus@nordberg.se>2020-01-23 13:09:53 +0100
commitabfbb7b7a3c1e14873c898082acd2b22db23e9a9 (patch)
tree043ae8ead7c0121dda16c5ba567f9d8b9bdd6b95 /src
parentee799425c42bbd46dddb506f9133091874a74175 (diff)
[entropy] Raise USB baud rate to match application 'cc20rng'
Using different baud rates for the two otherwise compatible applications risk confusing users of both applications. An espeicially unlucky case is setting host side to 460800 while reading from a board set to 921600 -- the stream will look random while it's actually pretty bad. Raising 'entropy' rather than lowering 'cc20rng' is motivated by the fact that cc20rng saturates 460800 baud(*) with its ~75 kB/s output. (*) 460800 baud should be 57.6 kB/s or 51.2 kB/s, depending on whether or not the stop bit is counted towards the baud rate. I would suppose it is.
Diffstat (limited to 'src')
-rw-r--r--src/entropy/stm_init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/entropy/stm_init.c b/src/entropy/stm_init.c
index 5f69760..fc8b84f 100644
--- a/src/entropy/stm_init.c
+++ b/src/entropy/stm_init.c
@@ -50,7 +50,7 @@
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
-#define UART1_BAUD_RATE 460800
+#define UART1_BAUD_RATE 921600
#define UART2_BAUD_RATE 115200