From c66358b83d5907cd5bdfd8ece3558df132a06089 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Tue, 27 Sep 2011 12:13:29 +0900 Subject: [PATCH] fix adc configuration --- ChangeLog | 5 +++++ README | 26 ++++++++++++++++++++------ src/random.c | 2 +- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 95e5ee5..08f8fc4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-09-27 NIIBE Yutaka + + * src/random.c (adcgrpcfg): Fix configuration value (had old + values by old example). + 2011-09-22 NIIBE Yutaka * src/random.c (ROTATE): Remove. diff --git a/README b/README index 5cdc3c3..e1295f2 100644 --- a/README +++ b/README @@ -52,7 +52,7 @@ A2: Yes, we should. It's not implemented yet, and I don't have an Targets ======= -STBee Mini and Olimex STM32-H103 is supported. +STBee Mini, Olimex STM32-H103, CQ-STARM, and STBee are supported. Souce code @@ -105,8 +105,8 @@ Then, we will have "neug.elf". How to install ============== -STBee Mini ----------- +STBee Mini and STBee +-------------------- Reset the board with "USER" switch pushed. Type following to write to flash: @@ -158,13 +158,19 @@ to generate final output. Here is a figure of the circuit. Entropy Pool (16-byte) +----------------+ | | - 8 | 8 parallel | 8 ||<-- [ Vref ] - +-/-- | CRC-16 |<--/--|| + | 8 parallel | 8 ||<-- [ Vref ] + +---- | CRC-16 |<--/--|| | | shift registers| ||<-- [ Temperature Sensor ] | | | | | |<----/------ SysTick | +----------------+ 1 - ===== Physical-based RNG + | Physical-based RNG + / 8 + | + v + ===== Output function + | + / 32 | +-------------+ | | @@ -237,6 +243,14 @@ Information on the Web Not yet. +Known Problem(s) +================ + +On STBee (high-density device of STM32), I observed stall of +generation of random number, after two hours, two hours and half, etc. +Not yet identified the bug. + + Your Contributions ================== diff --git a/src/random.c b/src/random.c index 0495eb8..3ac5148 100644 --- a/src/random.c +++ b/src/random.c @@ -54,7 +54,7 @@ static const ADCConversionGroup adcgrpcfg = { ADC_GRP1_NUM_CHANNELS, adccb, 0, - ADC_CR2_EXTSEL_SWSTART | ADC_CR2_TSVREFE | ADC_CR2_CONT, + ADC_CR2_TSVREFE, ADC_SMPR1_SMP_SENSOR(ADC_SAMPLE_1P5) | ADC_SMPR1_SMP_VREF(ADC_SAMPLE_1P5), 0, ADC_SQR1_NUM_CH(ADC_GRP1_NUM_CHANNELS), -- 2.20.1