From 32257914a5bdfd3b26ca91cf3a8e7e65e186c193 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 3 Feb 2014 12:45:06 +0000 Subject: Hard FP support added to CM4 Makefiles. Improved F4 IRQ_STORM demo. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6664 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- testhal/STM32F4xx/IRQ_STORM/Makefile | 2 +- testhal/STM32F4xx/IRQ_STORM/main.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'testhal/STM32F4xx/IRQ_STORM') diff --git a/testhal/STM32F4xx/IRQ_STORM/Makefile b/testhal/STM32F4xx/IRQ_STORM/Makefile index ea6defde6..481d607ba 100644 --- a/testhal/STM32F4xx/IRQ_STORM/Makefile +++ b/testhal/STM32F4xx/IRQ_STORM/Makefile @@ -58,7 +58,7 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),) USE_EXCEPTIONS_STACKSIZE = 0x400 endif -# Enables the use of FPU on Cortex-M4. +# Enables the use of FPU on Cortex-M4 (no, softfp, hard). ifeq ($(USE_FPU),) USE_FPU = no endif diff --git a/testhal/STM32F4xx/IRQ_STORM/main.c b/testhal/STM32F4xx/IRQ_STORM/main.c index bc34ba149..4994e77e3 100644 --- a/testhal/STM32F4xx/IRQ_STORM/main.c +++ b/testhal/STM32F4xx/IRQ_STORM/main.c @@ -286,7 +286,9 @@ int main(void) { println(""); saturated = FALSE; threshold = 0; - for (interval = 2000; interval >= 10; interval -= interval / 10) { + for (interval = 2000; + interval >= 2; + interval -= (interval + 9) / 10) { gptStartContinuous(&GPTD4, interval - 1); /* Slightly out of phase.*/ gptStartContinuous(&GPTD3, interval + 1); /* Slightly out of phase.*/ chThdSleepMilliseconds(1000); -- cgit v1.2.3