aboutsummaryrefslogtreecommitdiffstats
path: root/boards
diff options
context:
space:
mode:
Diffstat (limited to 'boards')
-rw-r--r--boards/OLIMEX_STM32_H103/board.h4
-rw-r--r--boards/OLIMEX_STM32_P103/board.h4
-rw-r--r--boards/RAISONANCE_REVA_STM8S/board.c11
-rw-r--r--boards/RAISONANCE_REVA_STM8S/board.h4
-rw-r--r--boards/ST_STM3210C_EVAL/board.h4
-rw-r--r--boards/ST_STM32VL_DISCOVERY/board.h2
-rw-r--r--boards/ST_STM8S_DISCOVERY/board.c7
-rw-r--r--boards/ST_STM8S_DISCOVERY/board.h2
8 files changed, 20 insertions, 18 deletions
diff --git a/boards/OLIMEX_STM32_H103/board.h b/boards/OLIMEX_STM32_H103/board.h
index d0e42fbd9..b4ddace8b 100644
--- a/boards/OLIMEX_STM32_H103/board.h
+++ b/boards/OLIMEX_STM32_H103/board.h
@@ -28,7 +28,7 @@
* Board identifier.
*/
#define BOARD_OLIMEX_STM32_H103
-#define BOARD_NAME "Olimex STM32-H103"
+#define BOARD_NAME "Olimex STM32-H103"
/*
* Board frequencies.
@@ -39,7 +39,7 @@
/*
* MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h.
*/
-#define STM32F103xB
+#define STM32F10X_MD
/*
* IO pins assignments.
diff --git a/boards/OLIMEX_STM32_P103/board.h b/boards/OLIMEX_STM32_P103/board.h
index 3ee715373..e868dc58a 100644
--- a/boards/OLIMEX_STM32_P103/board.h
+++ b/boards/OLIMEX_STM32_P103/board.h
@@ -28,7 +28,7 @@
* Board identifier.
*/
#define BOARD_OLIMEX_STM32_P103
-#define BOARD_NAME "Olimex STM32-P103"
+#define BOARD_NAME "Olimex STM32-P103"
/*
* Board frequencies.
@@ -39,7 +39,7 @@
/*
* MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h.
*/
-#define STM32F103xB
+#define STM32F10X_MD
/*
* IO pins assignments.
diff --git a/boards/RAISONANCE_REVA_STM8S/board.c b/boards/RAISONANCE_REVA_STM8S/board.c
index 770b51efb..61a6f2752 100644
--- a/boards/RAISONANCE_REVA_STM8S/board.c
+++ b/boards/RAISONANCE_REVA_STM8S/board.c
@@ -34,6 +34,7 @@ ROMCONST PALConfig pal_default_config =
{VAL_GPIOEODR, 0, VAL_GPIOEDDR, VAL_GPIOECR1, VAL_GPIOECR2},
{VAL_GPIOFODR, 0, VAL_GPIOFDDR, VAL_GPIOFCR1, VAL_GPIOFCR2},
{VAL_GPIOGODR, 0, VAL_GPIOGDDR, VAL_GPIOGCR1, VAL_GPIOGCR2},
+ }
};
/*
@@ -71,13 +72,13 @@ void hwinit(void) {
/*
* TIM2 initialization as system tick.
*/
- CLK->PCKENR1 |= 32; /* PCKEN15, TIM2 clock source.*/
+ CLK->PCKENR1 |= CLK_PCKENR1_TIM2;
TIM2->PSCR = 4; /* Prescaler divide by 2^4=16.*/
- TIM2->ARRH = TIM2_ARR >> 8;
- TIM2->ARRL = TIM2_ARR;
+ TIM2->ARRH = (uint8_t)(TIM2_ARR >> 8);
+ TIM2->ARRL = (uint8_t)(TIM2_ARR);
TIM2->CNTRH = 0;
TIM2->CNTRL = 0;
TIM2->SR1 = 0;
- TIM2->IER = 1; /* UIE */
- TIM2->CR1 = 1; /* CEN */
+ TIM2->IER = TIM2_IER_UIE;
+ TIM2->CR1 = TIM2_CR1_CEN;
}
diff --git a/boards/RAISONANCE_REVA_STM8S/board.h b/boards/RAISONANCE_REVA_STM8S/board.h
index dc93c0804..5434bd655 100644
--- a/boards/RAISONANCE_REVA_STM8S/board.h
+++ b/boards/RAISONANCE_REVA_STM8S/board.h
@@ -28,12 +28,12 @@
* Board identifiers.
*/
#define BOARD_REVA_V3_STM8S208RB
-#define BOARD_NAME "Raisonance REva V3 + STM8S208RB"
+#define BOARD_NAME "Raisonance REva V3 + STM8S208RB"
/*
* Board frequencies.
*/
-#define HSECLK 24000000
+#define HSECLK 0
/*
* MCU model used on the board.
diff --git a/boards/ST_STM3210C_EVAL/board.h b/boards/ST_STM3210C_EVAL/board.h
index 8c382a8b8..30bb6cb94 100644
--- a/boards/ST_STM3210C_EVAL/board.h
+++ b/boards/ST_STM3210C_EVAL/board.h
@@ -28,7 +28,7 @@
* Board identifier.
*/
#define BOARD_ST_STM3210C_EVAL
-#define BOARD_NAME "ST STM3210C-EVAL"
+#define BOARD_NAME "ST STM3210C-EVAL"
/*
* Board frequencies.
@@ -39,7 +39,7 @@
/*
* MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h.
*/
-#define STM32F107xC
+#define STM32F10X_CL
/*
* IO pins assignments.
diff --git a/boards/ST_STM32VL_DISCOVERY/board.h b/boards/ST_STM32VL_DISCOVERY/board.h
index a63c71aad..40ad78686 100644
--- a/boards/ST_STM32VL_DISCOVERY/board.h
+++ b/boards/ST_STM32VL_DISCOVERY/board.h
@@ -39,7 +39,7 @@
/*
* MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h.
*/
-#define STM32F100xB
+#define STM32F10X_MD_VL
/*
* IO pins assignments.
diff --git a/boards/ST_STM8S_DISCOVERY/board.c b/boards/ST_STM8S_DISCOVERY/board.c
index 0d41f79ff..61a6f2752 100644
--- a/boards/ST_STM8S_DISCOVERY/board.c
+++ b/boards/ST_STM8S_DISCOVERY/board.c
@@ -34,6 +34,7 @@ ROMCONST PALConfig pal_default_config =
{VAL_GPIOEODR, 0, VAL_GPIOEDDR, VAL_GPIOECR1, VAL_GPIOECR2},
{VAL_GPIOFODR, 0, VAL_GPIOFDDR, VAL_GPIOFCR1, VAL_GPIOFCR2},
{VAL_GPIOGODR, 0, VAL_GPIOGDDR, VAL_GPIOGCR1, VAL_GPIOGCR2},
+ }
};
/*
@@ -71,13 +72,13 @@ void hwinit(void) {
/*
* TIM2 initialization as system tick.
*/
- CLK->PCKENR1 |= 32; /* PCKEN15, TIM2 clock source.*/
+ CLK->PCKENR1 |= CLK_PCKENR1_TIM2;
TIM2->PSCR = 4; /* Prescaler divide by 2^4=16.*/
TIM2->ARRH = (uint8_t)(TIM2_ARR >> 8);
TIM2->ARRL = (uint8_t)(TIM2_ARR);
TIM2->CNTRH = 0;
TIM2->CNTRL = 0;
TIM2->SR1 = 0;
- TIM2->IER = 1; /* UIE */
- TIM2->CR1 = 1; /* CEN */
+ TIM2->IER = TIM2_IER_UIE;
+ TIM2->CR1 = TIM2_CR1_CEN;
}
diff --git a/boards/ST_STM8S_DISCOVERY/board.h b/boards/ST_STM8S_DISCOVERY/board.h
index f296bcd2a..06035f820 100644
--- a/boards/ST_STM8S_DISCOVERY/board.h
+++ b/boards/ST_STM8S_DISCOVERY/board.h
@@ -28,7 +28,7 @@
* Board identifiers.
*/
#define BOARD_ST_STM8S_DISCOVERY
-#define BOARD_NAME "ST STM8S-Discovery"
+#define BOARD_NAME "ST STM8S-Discovery"
/*
* Board frequencies.