mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-19 19:40:56 +00:00
FreeRTOS w/blink works
This commit is contained in:
1 parent
c44549bfa5
commit
151e375091
5 files changed
+46
-33
No files matched your search
@@ -13,6 +13,17 @@ static inline void led_toggle(void) {
|
||||
}
|
||||
|
||||
static inline void init_hardware(void) {
|
||||
RCC->CR |= (RCC_CR_HSEON);
|
||||
while (!(RCC->CR & RCC_CR_HSERDY)) (void) 0;
|
||||
RCC->CFGR &= ~(RCC_CFGR_SW);
|
||||
RCC->CFGR |= (RCC_CFGR_SW_HSE);
|
||||
RCC->CFGR &= ~(RCC_CFGR_PLLMULL);
|
||||
RCC->CFGR |= (RCC_CFGR_PLLMULL9);
|
||||
RCC->CR |= (RCC_CR_PLLON);
|
||||
while (!(RCC->CR & RCC_CR_PLLRDY)) (void) 0;
|
||||
RCC->CFGR &= ~(RCC_CFGR_SW);
|
||||
RCC->CFGR |= (RCC_CFGR_SW_PLL);
|
||||
|
||||
RCC->APB2ENR |= BIT(2) | BIT(3) | BIT(4); // Init GPIO banks A,B,C
|
||||
gpio_init(LED1, OUTPUT); // Set LED
|
||||
}
|
||||
Reference in new issue
Block a user