STLINK: Unconditionally enable MCO from 8 MHz HSE to PA8 as on original firmware. F3 Discovery has has no quarz for the F3 and needs it.

This commit is contained in:
Uwe Bonnes 2013-01-21 12:48:37 +01:00
parent ef09fb2b69
commit 747cc58c2c
1 changed files with 6 additions and 0 deletions

View File

@ -62,6 +62,12 @@ int platform_init(void)
gpio_set_mode(LED_PORT, GPIO_MODE_OUTPUT_2_MHZ,
GPIO_CNF_OUTPUT_PUSHPULL, LED_IDLE_RUN);
/* unconditionally activate MCO on PORTA8 with HSE*/
RCC_CFGR &= ~( 0xf<< 24);
RCC_CFGR |= (RCC_CFGR_MCO_HSECLK << 24);
gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_50_MHZ,
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO8);
/* Setup heartbeat timer */
systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8);
systick_set_reload(900000); /* Interrupt us at 10 Hz */