diff options
Diffstat (limited to 'boards/RAISONANCE_REVA_STM8S')
-rw-r--r-- | boards/RAISONANCE_REVA_STM8S/board.c | 11 | ||||
-rw-r--r-- | boards/RAISONANCE_REVA_STM8S/board.h | 4 |
2 files changed, 8 insertions, 7 deletions
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.
|