aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-11-06 12:25:34 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-11-06 12:25:34 +0000
commit2848e99c07e4174412dd0879046b9c3f82961695 (patch)
treedfa821ed2f87c642b344fa831e98dac38c3d97b0 /demos
parent9e51498e1196b28e5c073a7505df2ae08f05b59a (diff)
downloadChibiOS-2848e99c07e4174412dd0879046b9c3f82961695.tar.gz
ChibiOS-2848e99c07e4174412dd0879046b9c3f82961695.tar.bz2
ChibiOS-2848e99c07e4174412dd0879046b9c3f82961695.zip
STM32F4 support working, most device drivers still to test, report added.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3475 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos')
-rw-r--r--demos/ARMCM3-STM32F407-DISCOVERY/main.c14
-rw-r--r--demos/ARMCM3-STM32F407-DISCOVERY/mcuconf.h4
2 files changed, 9 insertions, 9 deletions
diff --git a/demos/ARMCM3-STM32F407-DISCOVERY/main.c b/demos/ARMCM3-STM32F407-DISCOVERY/main.c
index eb2653f32..cc12871d4 100644
--- a/demos/ARMCM3-STM32F407-DISCOVERY/main.c
+++ b/demos/ARMCM3-STM32F407-DISCOVERY/main.c
@@ -201,19 +201,19 @@ int main(void) {
/*
* Activates the serial driver 1 using the driver default configuration.
- * PA9 and PA10 are routed to USART1.
+ * PA2(TX) and PA3(RX) are routed to USART1.
*/
-// sdStart(&SD1, NULL);
-// palSetPadMode(GPIOA, 9, PAL_MODE_ALTERNATE(7));
-// palSetPadMode(GPIOA, 10, PAL_MODE_ALTERNATE(7));
+ sdStart(&SD2, NULL);
+ palSetPadMode(GPIOA, 2, PAL_MODE_ALTERNATE(7));
+ palSetPadMode(GPIOA, 3, PAL_MODE_ALTERNATE(7));
/*
* If the user button is pressed after the reset then the test suite is
* executed immediately before activating the various device drivers in
* order to not alter the benchmark scores.
*/
-// if (palReadPad(GPIOA, GPIOA_BUTTON))
-// TestThread(&SD1);
+ if (palReadPad(GPIOA, GPIOA_BUTTON))
+ TestThread(&SD2);
/*
* Initializes the SPI driver 2. The SPI2 signals are routed as follow:
@@ -262,7 +262,7 @@ int main(void) {
*/
while (TRUE) {
if (palReadPad(GPIOA, GPIOA_BUTTON))
- TestThread(&SD1);
+ TestThread(&SD2);
chThdSleepMilliseconds(500);
}
}
diff --git a/demos/ARMCM3-STM32F407-DISCOVERY/mcuconf.h b/demos/ARMCM3-STM32F407-DISCOVERY/mcuconf.h
index 2324fc0c1..2da3961ed 100644
--- a/demos/ARMCM3-STM32F407-DISCOVERY/mcuconf.h
+++ b/demos/ARMCM3-STM32F407-DISCOVERY/mcuconf.h
@@ -141,8 +141,8 @@
/*
* SERIAL driver system settings.
*/
-#define STM32_SERIAL_USE_USART1 TRUE
-#define STM32_SERIAL_USE_USART2 FALSE
+#define STM32_SERIAL_USE_USART1 FALSE
+#define STM32_SERIAL_USE_USART2 TRUE
#define STM32_SERIAL_USE_USART3 FALSE
#define STM32_SERIAL_USE_UART4 FALSE
#define STM32_SERIAL_USE_UART5 FALSE