diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-23 11:26:33 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-23 11:26:33 +0000 |
commit | 4377d247aedc476bc9a7784ecf534ac662ff7dbd (patch) | |
tree | 4591c52415cd1725f4061493bb604ba05fb4e26f /testhal/STM32F4xx/IRQ_STORM_FPU | |
parent | 4a63f14ecb4bcc4bfc0c0a25c4e1455e599144a4 (diff) | |
download | ChibiOS-4377d247aedc476bc9a7784ecf534ac662ff7dbd.tar.gz ChibiOS-4377d247aedc476bc9a7784ecf534ac662ff7dbd.tar.bz2 ChibiOS-4377d247aedc476bc9a7784ecf534ac662ff7dbd.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6212 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F4xx/IRQ_STORM_FPU')
-rw-r--r-- | testhal/STM32F4xx/IRQ_STORM_FPU/.project | 2 | ||||
-rw-r--r-- | testhal/STM32F4xx/IRQ_STORM_FPU/Makefile | 2 | ||||
-rw-r--r-- | testhal/STM32F4xx/IRQ_STORM_FPU/main.c | 24 |
3 files changed, 14 insertions, 14 deletions
diff --git a/testhal/STM32F4xx/IRQ_STORM_FPU/.project b/testhal/STM32F4xx/IRQ_STORM_FPU/.project index 46cb19671..d2e79b473 100644 --- a/testhal/STM32F4xx/IRQ_STORM_FPU/.project +++ b/testhal/STM32F4xx/IRQ_STORM_FPU/.project @@ -27,7 +27,7 @@ <link>
<name>board</name>
<type>2</type>
- <locationURI>CHIBIOS/boards/ST_STM32F4_DISCOVERY</locationURI>
+ <locationURI>CHIBIOS/os/hal/boards/ST_STM32F4_DISCOVERY</locationURI>
</link>
<link>
<name>os</name>
diff --git a/testhal/STM32F4xx/IRQ_STORM_FPU/Makefile b/testhal/STM32F4xx/IRQ_STORM_FPU/Makefile index df702a82d..f4d323f56 100644 --- a/testhal/STM32F4xx/IRQ_STORM_FPU/Makefile +++ b/testhal/STM32F4xx/IRQ_STORM_FPU/Makefile @@ -86,7 +86,7 @@ CSRC = $(PORTSRC) \ $(OSALSRC) \
$(PLATFORMSRC) \
$(BOARDSRC) \
- main.c
+ extfunc.c main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
diff --git a/testhal/STM32F4xx/IRQ_STORM_FPU/main.c b/testhal/STM32F4xx/IRQ_STORM_FPU/main.c index d1c5c7bb1..0f67bc3af 100644 --- a/testhal/STM32F4xx/IRQ_STORM_FPU/main.c +++ b/testhal/STM32F4xx/IRQ_STORM_FPU/main.c @@ -39,7 +39,7 @@ float ff2(float par1, float par2, float par3, float par4); /* Test related code. */
/*===========================================================================*/
-static bool_t saturated;
+static bool saturated;
/*
* Test worker thread.
@@ -59,7 +59,7 @@ static msg_t WorkerThread(void *arg) { f4 = ff1(6.0f);
f5 = ff2(f5, f4, f5, f4);
if (f5 != 324.0f)
- chSysHalt();
+ chSysHalt("float corrupion #1");
}
}
@@ -81,7 +81,7 @@ static msg_t PeriodicThread(void *arg) { f4 = ff1(7.0f);
f5 = ff2(f5, f4, f5, f4);
if (f5 != 484.0f)
- chSysHalt();
+ chSysHalt("float corrupion #2");
chThdSleepSeconds(1);
}
}
@@ -89,7 +89,7 @@ static msg_t PeriodicThread(void *arg) { /*
* GPT2 callback.
*/
-static void gpt2cb(GPTDriver *gptp) {
+static void gpt4cb(GPTDriver *gptp) {
float f1, f2, f3, f4, f5;
(void)gptp;
@@ -101,7 +101,7 @@ static void gpt2cb(GPTDriver *gptp) { f4 = ff1(5.0f);
f5 = ff2(f5, f4, f5, f4);
if (f5 != 196.0f)
- chSysHalt();
+ chSysHalt("float corrupion #3");
}
/*
@@ -119,15 +119,15 @@ static void gpt3cb(GPTDriver *gptp) { f4 = ff1(4.0f);
f5 = ff2(f5, f4, f5, f4);
if (f5 != 100.0f)
- chSysHalt();
+ chSysHalt("float corrupion #4");
}
/*
* GPT2 configuration.
*/
-static const GPTConfig gpt2cfg = {
+static const GPTConfig gpt4cfg = {
1000000, /* 1MHz timer clock.*/
- gpt2cb, /* Timer callback.*/
+ gpt4cb, /* Timer callback.*/
0
};
@@ -197,7 +197,7 @@ int main(void) { sdStart(&SD2, NULL); /* Default is 38400-8-N-1.*/
palSetPadMode(GPIOA, 2, PAL_MODE_ALTERNATE(7));
palSetPadMode(GPIOA, 3, PAL_MODE_ALTERNATE(7));
- gptStart(&GPTD2, &gpt2cfg);
+ gptStart(&GPTD4, &gpt4cfg);
gptStart(&GPTD3, &gpt3cfg);
/*
@@ -260,10 +260,10 @@ int main(void) { saturated = FALSE;
threshold = 0;
for (interval = 2000; interval >= 10; interval -= interval / 10) {
- gptStartContinuous(&GPTD2, interval - 1); /* Slightly out of phase.*/
+ gptStartContinuous(&GPTD4, interval - 1); /* Slightly out of phase.*/
gptStartContinuous(&GPTD3, interval + 1); /* Slightly out of phase.*/
chThdSleepMilliseconds(1000);
- gptStopTimer(&GPTD2);
+ gptStopTimer(&GPTD4);
gptStopTimer(&GPTD3);
if (!saturated)
print(".");
@@ -284,7 +284,7 @@ int main(void) { if (threshold > worst)
worst = threshold;
}
- gptStopTimer(&GPTD2);
+ gptStopTimer(&GPTD4);
gptStopTimer(&GPTD3);
print("Worst case at ");
|