diff options
Diffstat (limited to 'os/hal/platforms/STM32/hal_lld.c')
-rw-r--r-- | os/hal/platforms/STM32/hal_lld.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32/hal_lld.c b/os/hal/platforms/STM32/hal_lld.c index 8d8322033..cbbdf1587 100644 --- a/os/hal/platforms/STM32/hal_lld.c +++ b/os/hal/platforms/STM32/hal_lld.c @@ -57,6 +57,12 @@ */
void hal_lld_init(void) {
+ /* Reset of all the peripherals.*/
+ RCC->APB1RSTR = 0xFFFFFFFF;
+ RCC->APB2RSTR = 0xFFFFFFFF;
+ RCC->APB1RSTR = 0;
+ RCC->APB2RSTR = 0;
+
/* SysTick initialization using the system clock.*/
SysTick->LOAD = STM32_HCLK / CH_FREQUENCY - 1;
SysTick->VAL = 0;
|