diff --git a/boards/RAISONANCE_REVA_STM8S/board.c b/boards/RAISONANCE_REVA_STM8S/board.c index 9d27cc619..9c785627c 100644 --- a/boards/RAISONANCE_REVA_STM8S/board.c +++ b/boards/RAISONANCE_REVA_STM8S/board.c @@ -37,7 +37,7 @@ CH_IRQ_HANDLER(13) { chSysTimerHandlerI(); chSysUnlockFromIsr(); - TIM2_SR1 = 0; + TIM2->SR1 = 0; CH_IRQ_EPILOGUE(); } @@ -55,13 +55,13 @@ void hwinit(void) { /* * TIM2 initialization as system tick. */ - CLK_PCKENR1 |= 32; /* PCKEN15, TIM2 clock source.*/ - TIM2_PSCR = 4; /* Prescaler divide by 2^4=16.*/ - TIM2_ARRH = TIM2_ARR >> 8; - TIM2_ARRL = TIM2_ARR; - TIM2_CNTRH = 0; - TIM2_CNTRL = 0; - TIM2_SR1 = 0; - TIM2_IER = 1; /* UIE */ - TIM2_CR1 = 1; /* CEN */ + CLK->PCKENR1 |= 32; /* PCKEN15, TIM2 clock source.*/ + TIM2->PSCR = 4; /* Prescaler divide by 2^4=16.*/ + TIM2->ARRH = TIM2_ARR >> 8; + TIM2->ARRL = TIM2_ARR; + TIM2->CNTRH = 0; + TIM2->CNTRL = 0; + TIM2->SR1 = 0; + TIM2->IER = 1; /* UIE */ + TIM2->CR1 = 1; /* CEN */ } diff --git a/boards/RAISONANCE_REVA_STM8S/board.h b/boards/RAISONANCE_REVA_STM8S/board.h index adca21661..dc93c0804 100644 --- a/boards/RAISONANCE_REVA_STM8S/board.h +++ b/boards/RAISONANCE_REVA_STM8S/board.h @@ -37,9 +37,8 @@ /* * MCU model used on the board. - * The available models are listed in the file ./os/hal/platforms/stm8/stm8.h */ -#define STM8_PLATFORM PLATFORM_STM8S208RB +#define STM8S208 /* * Pin definitions. diff --git a/demos/STM8S-STM8S208-RC/ch.rapp b/demos/STM8S-STM8S208-RC/ch.rapp index 499f89206..5f89b1c92 100644 --- a/demos/STM8S-STM8S208-RC/ch.rapp +++ b/demos/STM8S-STM8S208-RC/ch.rapp @@ -1,5 +1,5 @@ - + @@ -10,15 +10,15 @@
- +
- +
- + - + - +
@@ -30,7 +30,7 @@ - + @@ -41,17 +41,17 @@
- +
- +
- + - + - +
- +
@@ -66,11 +66,11 @@ - + - + @@ -85,33 +85,33 @@ - - - - + + + +
- +
- +
- +
- +
@@ -122,33 +122,33 @@
- +
- +
- +
- +
- +
- +
- +
diff --git a/demos/STM8S-STM8S208-RC/ch.rprj b/demos/STM8S-STM8S208-RC/ch.rprj index d066d7b79..dc557d7be 100644 --- a/demos/STM8S-STM8S208-RC/ch.rprj +++ b/demos/STM8S-STM8S208-RC/ch.rprj @@ -1,4 +1,4 @@ - - + + \ No newline at end of file diff --git a/demos/STM8S-STM8S208-RC/mcuconf.h b/demos/STM8S-STM8S208-RC/mcuconf.h index 227499992..c2148ac5b 100644 --- a/demos/STM8S-STM8S208-RC/mcuconf.h +++ b/demos/STM8S-STM8S208-RC/mcuconf.h @@ -36,4 +36,5 @@ * SERIAL driver system settings. */ #define USE_STM8_UART1 TRUE +#define USE_STM8_UART2 FALSE #define USE_STM8_UART3 FALSE diff --git a/os/hal/platforms/STM8/pal_lld.h b/os/hal/platforms/STM8/pal_lld.h index cd819e7ef..7f2fb2cd9 100644 --- a/os/hal/platforms/STM8/pal_lld.h +++ b/os/hal/platforms/STM8/pal_lld.h @@ -58,8 +58,7 @@ * or whole ports can be reprogrammed at later time. */ typedef struct { -#if defined(STM8S207) || defined(STM8S208) || defined(STM8S105) || \ - defined(__DOXYGEN__) +#if defined(STM8S105) || defined(__DOXYGEN__) GPIO_TypeDef P[7]; #elif defined(STM8S207) || defined(STM8S208) GPIO_TypeDef P[9];