aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32F4xx/IRQ_STORM
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-02-03 12:45:06 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-02-03 12:45:06 +0000
commit32257914a5bdfd3b26ca91cf3a8e7e65e186c193 (patch)
treefaf785214f32c009761d81276cd4ac78973b4b34 /testhal/STM32F4xx/IRQ_STORM
parentdacad21aed10f7d619a3e09dc112a5c6ede2e778 (diff)
downloadChibiOS-32257914a5bdfd3b26ca91cf3a8e7e65e186c193.tar.gz
ChibiOS-32257914a5bdfd3b26ca91cf3a8e7e65e186c193.tar.bz2
ChibiOS-32257914a5bdfd3b26ca91cf3a8e7e65e186c193.zip
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
Diffstat (limited to 'testhal/STM32F4xx/IRQ_STORM')
-rw-r--r--testhal/STM32F4xx/IRQ_STORM/Makefile2
-rw-r--r--testhal/STM32F4xx/IRQ_STORM/main.c4
2 files changed, 4 insertions, 2 deletions
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);