aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/hal/boards/ST_NUCLEO32_F031K6/board.h12
-rw-r--r--os/hal/boards/ST_NUCLEO32_F031K6/cfg/board.chcfg6
-rw-r--r--os/hal/boards/ST_NUCLEO32_F042K6/board.h12
-rw-r--r--os/hal/boards/ST_NUCLEO32_F042K6/cfg/board.chcfg6
-rw-r--r--os/hal/boards/ST_NUCLEO32_F303K8/board.h12
-rw-r--r--os/hal/boards/ST_NUCLEO32_F303K8/cfg/board.chcfg6
-rw-r--r--os/hal/ports/STM32/LLD/ADCv3/adc_lld.h16
7 files changed, 42 insertions, 28 deletions
diff --git a/os/hal/boards/ST_NUCLEO32_F031K6/board.h b/os/hal/boards/ST_NUCLEO32_F031K6/board.h
index 12867057e..471ea4e1d 100644
--- a/os/hal/boards/ST_NUCLEO32_F031K6/board.h
+++ b/os/hal/boards/ST_NUCLEO32_F031K6/board.h
@@ -222,8 +222,8 @@
* PA2 - VCP_TX (alternate 1).
* PA3 - ARD_A2 (input pullup).
* PA4 - ARD_A3 (input pullup).
- * PA5 - ARD_A4 (input floating).
- * PA6 - ARD_A5 (input floating).
+ * PA5 - ARD_A4 (input pullup).
+ * PA6 - ARD_A5 (input pullup).
* PA7 - ARD_A6 (input pullup).
* PA8 - ARD_D9 (input pullup).
* PA9 - ARD_D1 (input pullup).
@@ -287,8 +287,8 @@
PIN_PUPDR_FLOATING(GPIOA_VCP_TX) | \
PIN_PUPDR_PULLUP(GPIOA_ARD_A2) | \
PIN_PUPDR_PULLUP(GPIOA_ARD_A3) | \
- PIN_PUPDR_FLOATING(GPIOA_ARD_A4) | \
- PIN_PUPDR_FLOATING(GPIOA_ARD_A5) | \
+ PIN_PUPDR_PULLUP(GPIOA_ARD_A4) | \
+ PIN_PUPDR_PULLUP(GPIOA_ARD_A5) | \
PIN_PUPDR_PULLUP(GPIOA_ARD_A6) | \
PIN_PUPDR_PULLUP(GPIOA_ARD_D9) | \
PIN_PUPDR_PULLUP(GPIOA_ARD_D1) | \
@@ -342,7 +342,7 @@
* PB5 - ARD_D11 (input pullup).
* PB6 - ARD_D5 ARD_A5_ALT (input pullup).
* PB7 - ARD_D4 ARD_A4_ALT (input pullup).
- * PB8 - PIN8 (input floating).
+ * PB8 - PIN8 (input pullup).
* PB9 - PIN9 (input pullup).
* PB10 - PIN10 (input pullup).
* PB11 - PIN11 (input pullup).
@@ -407,7 +407,7 @@
PIN_PUPDR_PULLUP(GPIOB_ARD_D11) | \
PIN_PUPDR_PULLUP(GPIOB_ARD_D5) | \
PIN_PUPDR_PULLUP(GPIOB_ARD_D4) | \
- PIN_PUPDR_FLOATING(GPIOB_PIN8) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN8) | \
PIN_PUPDR_PULLUP(GPIOB_PIN9) | \
PIN_PUPDR_PULLUP(GPIOB_PIN10) | \
PIN_PUPDR_PULLUP(GPIOB_PIN11) | \
diff --git a/os/hal/boards/ST_NUCLEO32_F031K6/cfg/board.chcfg b/os/hal/boards/ST_NUCLEO32_F031K6/cfg/board.chcfg
index 0ede126ec..cd8ab4332 100644
--- a/os/hal/boards/ST_NUCLEO32_F031K6/cfg/board.chcfg
+++ b/os/hal/boards/ST_NUCLEO32_F031K6/cfg/board.chcfg
@@ -61,7 +61,7 @@
Type="PushPull"
Level="Low"
Speed="High"
- Resistor="Floating"
+ Resistor="PullUp"
Mode="Input"
Alternate="0" />
<pin6
@@ -69,7 +69,7 @@
Type="PushPull"
Level="High"
Speed="Maximum"
- Resistor="Floating"
+ Resistor="PullUp"
Mode="Input"
Alternate="0" />
<pin7
@@ -215,7 +215,7 @@
Type="PushPull"
Level="High"
Speed="Maximum"
- Resistor="Floating"
+ Resistor="PullUp"
Mode="Input"
Alternate="0" />
<pin9
diff --git a/os/hal/boards/ST_NUCLEO32_F042K6/board.h b/os/hal/boards/ST_NUCLEO32_F042K6/board.h
index 2ee3d7946..0d0d256ea 100644
--- a/os/hal/boards/ST_NUCLEO32_F042K6/board.h
+++ b/os/hal/boards/ST_NUCLEO32_F042K6/board.h
@@ -222,8 +222,8 @@
* PA2 - VCP_TX (alternate 1).
* PA3 - ARD_A2 (input pullup).
* PA4 - ARD_A3 (input pullup).
- * PA5 - ARD_A4 (input floating).
- * PA6 - ARD_A5 (input floating).
+ * PA5 - ARD_A4 (input pullup).
+ * PA6 - ARD_A5 (input pullup).
* PA7 - ARD_A6 (input pullup).
* PA8 - ARD_D9 (input pullup).
* PA9 - ARD_D1 (input pullup).
@@ -287,8 +287,8 @@
PIN_PUPDR_FLOATING(GPIOA_VCP_TX) | \
PIN_PUPDR_PULLUP(GPIOA_ARD_A2) | \
PIN_PUPDR_PULLUP(GPIOA_ARD_A3) | \
- PIN_PUPDR_FLOATING(GPIOA_ARD_A4) | \
- PIN_PUPDR_FLOATING(GPIOA_ARD_A5) | \
+ PIN_PUPDR_PULLUP(GPIOA_ARD_A4) | \
+ PIN_PUPDR_PULLUP(GPIOA_ARD_A5) | \
PIN_PUPDR_PULLUP(GPIOA_ARD_A6) | \
PIN_PUPDR_PULLUP(GPIOA_ARD_D9) | \
PIN_PUPDR_PULLUP(GPIOA_ARD_D1) | \
@@ -342,7 +342,7 @@
* PB5 - ARD_D11 (input pullup).
* PB6 - ARD_D5 ARD_A5_ALT (input pullup).
* PB7 - ARD_D4 ARD_A4_ALT (input pullup).
- * PB8 - PIN8 (input floating).
+ * PB8 - PIN8 (input pullup).
* PB9 - PIN9 (input pullup).
* PB10 - PIN10 (input pullup).
* PB11 - PIN11 (input pullup).
@@ -407,7 +407,7 @@
PIN_PUPDR_PULLUP(GPIOB_ARD_D11) | \
PIN_PUPDR_PULLUP(GPIOB_ARD_D5) | \
PIN_PUPDR_PULLUP(GPIOB_ARD_D4) | \
- PIN_PUPDR_FLOATING(GPIOB_PIN8) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN8) | \
PIN_PUPDR_PULLUP(GPIOB_PIN9) | \
PIN_PUPDR_PULLUP(GPIOB_PIN10) | \
PIN_PUPDR_PULLUP(GPIOB_PIN11) | \
diff --git a/os/hal/boards/ST_NUCLEO32_F042K6/cfg/board.chcfg b/os/hal/boards/ST_NUCLEO32_F042K6/cfg/board.chcfg
index c6e219907..00d07f4f2 100644
--- a/os/hal/boards/ST_NUCLEO32_F042K6/cfg/board.chcfg
+++ b/os/hal/boards/ST_NUCLEO32_F042K6/cfg/board.chcfg
@@ -61,7 +61,7 @@
Type="PushPull"
Level="Low"
Speed="High"
- Resistor="Floating"
+ Resistor="PullUp"
Mode="Input"
Alternate="0" />
<pin6
@@ -69,7 +69,7 @@
Type="PushPull"
Level="High"
Speed="Maximum"
- Resistor="Floating"
+ Resistor="PullUp"
Mode="Input"
Alternate="0" />
<pin7
@@ -215,7 +215,7 @@
Type="PushPull"
Level="High"
Speed="Maximum"
- Resistor="Floating"
+ Resistor="PullUp"
Mode="Input"
Alternate="0" />
<pin9
diff --git a/os/hal/boards/ST_NUCLEO32_F303K8/board.h b/os/hal/boards/ST_NUCLEO32_F303K8/board.h
index b4f417e7c..161abf28f 100644
--- a/os/hal/boards/ST_NUCLEO32_F303K8/board.h
+++ b/os/hal/boards/ST_NUCLEO32_F303K8/board.h
@@ -222,8 +222,8 @@
* PA2 - VCP_TX (alternate 7).
* PA3 - ARD_A2 (input pullup).
* PA4 - ARD_A3 (input pullup).
- * PA5 - ARD_A4 (input floating).
- * PA6 - ARD_A5 (input floating).
+ * PA5 - ARD_A4 (input pullup).
+ * PA6 - ARD_A5 (input pullup).
* PA7 - ARD_A6 (input pullup).
* PA8 - ARD_D9 (input pullup).
* PA9 - ARD_D1 (input pullup).
@@ -287,8 +287,8 @@
PIN_PUPDR_FLOATING(GPIOA_VCP_TX) | \
PIN_PUPDR_PULLUP(GPIOA_ARD_A2) | \
PIN_PUPDR_PULLUP(GPIOA_ARD_A3) | \
- PIN_PUPDR_FLOATING(GPIOA_ARD_A4) | \
- PIN_PUPDR_FLOATING(GPIOA_ARD_A5) | \
+ PIN_PUPDR_PULLUP(GPIOA_ARD_A4) | \
+ PIN_PUPDR_PULLUP(GPIOA_ARD_A5) | \
PIN_PUPDR_PULLUP(GPIOA_ARD_A6) | \
PIN_PUPDR_PULLUP(GPIOA_ARD_D9) | \
PIN_PUPDR_PULLUP(GPIOA_ARD_D1) | \
@@ -342,7 +342,7 @@
* PB5 - ARD_D11 (input pullup).
* PB6 - ARD_D5 ARD_A5_ALT (input pullup).
* PB7 - ARD_D4 ARD_A4_ALT (input pullup).
- * PB8 - PIN8 (input floating).
+ * PB8 - PIN8 (input pullup).
* PB9 - PIN9 (input pullup).
* PB10 - PIN10 (input pullup).
* PB11 - PIN11 (input pullup).
@@ -407,7 +407,7 @@
PIN_PUPDR_PULLUP(GPIOB_ARD_D11) | \
PIN_PUPDR_PULLUP(GPIOB_ARD_D5) | \
PIN_PUPDR_PULLUP(GPIOB_ARD_D4) | \
- PIN_PUPDR_FLOATING(GPIOB_PIN8) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN8) | \
PIN_PUPDR_PULLUP(GPIOB_PIN9) | \
PIN_PUPDR_PULLUP(GPIOB_PIN10) | \
PIN_PUPDR_PULLUP(GPIOB_PIN11) | \
diff --git a/os/hal/boards/ST_NUCLEO32_F303K8/cfg/board.chcfg b/os/hal/boards/ST_NUCLEO32_F303K8/cfg/board.chcfg
index f338dd943..2eabcbe80 100644
--- a/os/hal/boards/ST_NUCLEO32_F303K8/cfg/board.chcfg
+++ b/os/hal/boards/ST_NUCLEO32_F303K8/cfg/board.chcfg
@@ -61,7 +61,7 @@
Type="PushPull"
Level="Low"
Speed="High"
- Resistor="Floating"
+ Resistor="PullUp"
Mode="Input"
Alternate="0" />
<pin6
@@ -69,7 +69,7 @@
Type="PushPull"
Level="High"
Speed="Maximum"
- Resistor="Floating"
+ Resistor="PullUp"
Mode="Input"
Alternate="0" />
<pin7
@@ -215,7 +215,7 @@
Type="PushPull"
Level="High"
Speed="Maximum"
- Resistor="Floating"
+ Resistor="PullUp"
Mode="Input"
Alternate="0" />
<pin9
diff --git a/os/hal/ports/STM32/LLD/ADCv3/adc_lld.h b/os/hal/ports/STM32/LLD/ADCv3/adc_lld.h
index 1e29c8508..3c39560d4 100644
--- a/os/hal/ports/STM32/LLD/ADCv3/adc_lld.h
+++ b/os/hal/ports/STM32/LLD/ADCv3/adc_lld.h
@@ -35,6 +35,7 @@
* @name Available analog channels
* @{
*/
+#define ADC_CHANNEL_IN0 0 /**< @brief External analog input 0. */
#define ADC_CHANNEL_IN1 1 /**< @brief External analog input 1. */
#define ADC_CHANNEL_IN2 2 /**< @brief External analog input 2. */
#define ADC_CHANNEL_IN3 3 /**< @brief External analog input 3. */
@@ -59,6 +60,7 @@
* @name Sampling rates
* @{
*/
+#if defined(STM32F3XX)
#define ADC_SMPR_SMP_1P5 0 /**< @brief 14 cycles conversion time */
#define ADC_SMPR_SMP_2P5 1 /**< @brief 15 cycles conversion time. */
#define ADC_SMPR_SMP_4P5 2 /**< @brief 17 cycles conversion time. */
@@ -67,6 +69,17 @@
#define ADC_SMPR_SMP_61P5 5 /**< @brief 74 cycles conversion time. */
#define ADC_SMPR_SMP_181P5 6 /**< @brief 194 cycles conversion time. */
#define ADC_SMPR_SMP_601P5 7 /**< @brief 614 cycles conversion time. */
+#endif
+#if defined(STM32L4XX)
+#define ADC_SMPR_SMP_2P5 0 /**< @brief 15 cycles conversion time */
+#define ADC_SMPR_SMP_6P5 1 /**< @brief 19 cycles conversion time. */
+#define ADC_SMPR_SMP_12P5 2 /**< @brief 25 cycles conversion time. */
+#define ADC_SMPR_SMP_24P5 3 /**< @brief 37 cycles conversion time. */
+#define ADC_SMPR_SMP_47P5 4 /**< @brief 60 cycles conversion time. */
+#define ADC_SMPR_SMP_92P5 5 /**< @brief 105 cycles conversion time. */
+#define ADC_SMPR_SMP_247P5 6 /**< @brief 260 cycles conversion time. */
+#define ADC_SMPR_SMP_640P5 7 /**< @brief 653 cycles conversion time. */
+#endif
/** @} */
/**
@@ -612,7 +625,7 @@ typedef struct {
* @note The bits DMAEN and DMACFG are enforced internally
* to the driver, keep them to zero.
* @note The bits @p ADC_CFGR_CONT or @p ADC_CFGR_DISCEN must be
- * specified in continuous more or if the buffer depth is
+ * specified in continuous mode or if the buffer depth is
* greater than one.
*/
uint32_t cfgr;
@@ -768,6 +781,7 @@ struct ADCDriver {
* @name Sampling rate settings helper macros
* @{
*/
+#define ADC_SMPR1_SMP_AN0(n) ((n) << 0) /**< @brief AN0 sampling time. */
#define ADC_SMPR1_SMP_AN1(n) ((n) << 3) /**< @brief AN1 sampling time. */
#define ADC_SMPR1_SMP_AN2(n) ((n) << 6) /**< @brief AN2 sampling time. */
#define ADC_SMPR1_SMP_AN3(n) ((n) << 9) /**< @brief AN3 sampling time. */