aboutsummaryrefslogtreecommitdiffstats
path: root/testhal
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-18 18:23:50 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-18 18:23:50 +0000
commit07f868d3792cadd6377fdb5039c7cbf27f68bd92 (patch)
treecff5fe6a2845c508f8c2fec3a65700a27cf670da /testhal
parent373735d5290c3d0869fe014e4bd93e5d4824c89b (diff)
downloadChibiOS-07f868d3792cadd6377fdb5039c7cbf27f68bd92.tar.gz
ChibiOS-07f868d3792cadd6377fdb5039c7cbf27f68bd92.tar.bz2
ChibiOS-07f868d3792cadd6377fdb5039c7cbf27f68bd92.zip
GPT driver tested on STM32L.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3341 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal')
-rw-r--r--testhal/STM32F1xx/GPT/main.c2
-rw-r--r--testhal/STM32L1xx/GPT/Makefile2
-rw-r--r--testhal/STM32L1xx/GPT/main.c4
3 files changed, 7 insertions, 1 deletions
diff --git a/testhal/STM32F1xx/GPT/main.c b/testhal/STM32F1xx/GPT/main.c
index 09b3ba9b3..e3e0797f8 100644
--- a/testhal/STM32F1xx/GPT/main.c
+++ b/testhal/STM32F1xx/GPT/main.c
@@ -86,8 +86,10 @@ int main(void) {
* five seconds.
*/
while (TRUE) {
+ gptStopTimer(&GPTD1);
gptStartContinuous(&GPTD1, 5000);
chThdSleepMilliseconds(5000);
+ gptStopTimer(&GPTD1);
gptStartContinuous(&GPTD1, 2500);
chThdSleepMilliseconds(5000);
}
diff --git a/testhal/STM32L1xx/GPT/Makefile b/testhal/STM32L1xx/GPT/Makefile
index 9209b441d..10a6ed0e8 100644
--- a/testhal/STM32L1xx/GPT/Makefile
+++ b/testhal/STM32L1xx/GPT/Makefile
@@ -5,7 +5,7 @@
# Compiler options here.
ifeq ($(USE_OPT),)
- USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
+ USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16
endif
# C++ specific options here (added to USE_OPT).
diff --git a/testhal/STM32L1xx/GPT/main.c b/testhal/STM32L1xx/GPT/main.c
index 90e06879a..49247bac6 100644
--- a/testhal/STM32L1xx/GPT/main.c
+++ b/testhal/STM32L1xx/GPT/main.c
@@ -86,8 +86,12 @@ int main(void) {
* five seconds.
*/
while (TRUE) {
+ palSetPad(GPIOB, GPIOB_LED3);
+ gptStopTimer(&GPTD2);
gptStartContinuous(&GPTD2, 5000);
chThdSleepMilliseconds(5000);
+ palClearPad(GPIOB, GPIOB_LED3);
+ gptStopTimer(&GPTD2);
gptStartContinuous(&GPTD2, 2500);
chThdSleepMilliseconds(5000);
}