From 09fbe783c5cdbc4d817fa4b59ccaab15f0167d97 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Mon, 14 Oct 2013 17:02:59 +0200 Subject: [PATCH] f4discovery: Limit clock to 48 MHz and stack 24 kiByte so that code can be compiled unchanged for F401Discovery too. TODO: Bump clk up to 84 MHz as soon as libopencm3 supports that speed. --- src/platforms/f4discovery/Makefile.inc | 2 +- src/platforms/f4discovery/platform.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platforms/f4discovery/Makefile.inc b/src/platforms/f4discovery/Makefile.inc index f67b278..88575bb 100644 --- a/src/platforms/f4discovery/Makefile.inc +++ b/src/platforms/f4discovery/Makefile.inc @@ -7,7 +7,7 @@ CFLAGS += -Istm32/include -mcpu=cortex-m4 -mthumb \ -DSTM32F4 -DF4DISCOVERY -I../libopencm3/include \ -Iplatforms/stm32 -LDFLAGS = -lopencm3_stm32f4 -Wl,--defsym,_stack=0x20020000 \ +LDFLAGS = -lopencm3_stm32f4 -Wl,--defsym,_stack=0x20006000 \ -Wl,-T,platforms/stm32/f4discovery.ld -nostartfiles -lc -lnosys \ -Wl,-Map=mapfile -mthumb -mcpu=cortex-m4 -Wl,-gc-sections \ -mfloat-abi=hard -mfpu=fpv4-sp-d16 \ diff --git a/src/platforms/f4discovery/platform.c b/src/platforms/f4discovery/platform.c index 645a3c5..6ee36bd 100644 --- a/src/platforms/f4discovery/platform.c +++ b/src/platforms/f4discovery/platform.c @@ -53,7 +53,7 @@ int platform_init(void) scb_reset_core(); } - rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]); + rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_48MHZ]); /* Enable peripherals */ rcc_peripheral_enable_clock(&RCC_AHB2ENR, RCC_AHB2ENR_OTGFSEN);