aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32F3xx/IRQ_STORM
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-12-16 10:05:35 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-12-16 10:05:35 +0000
commitce80dcb337586d700d37580a5768400abcc797be (patch)
tree4703e07c60a3cd90a3c60f39ba705eca30c1e405 /testhal/STM32F3xx/IRQ_STORM
parentaaac1b2e53af4dcee1278c2de6e90ce952a5f904 (diff)
downloadChibiOS-ce80dcb337586d700d37580a5768400abcc797be.tar.gz
ChibiOS-ce80dcb337586d700d37580a5768400abcc797be.tar.bz2
ChibiOS-ce80dcb337586d700d37580a5768400abcc797be.zip
Added UART driver support to the STM32F3xx HAL.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4920 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F3xx/IRQ_STORM')
-rw-r--r--testhal/STM32F3xx/IRQ_STORM/main.c6
-rw-r--r--testhal/STM32F3xx/IRQ_STORM/mcuconf.h14
-rw-r--r--testhal/STM32F3xx/IRQ_STORM/readme.txt3
3 files changed, 19 insertions, 4 deletions
diff --git a/testhal/STM32F3xx/IRQ_STORM/main.c b/testhal/STM32F3xx/IRQ_STORM/main.c
index 6ba712a3d..61f409609 100644
--- a/testhal/STM32F3xx/IRQ_STORM/main.c
+++ b/testhal/STM32F3xx/IRQ_STORM/main.c
@@ -214,11 +214,11 @@ int main(void) {
chSysInit();
/*
- * Prepares the Serial driver 2 and GPT drivers 2 and 3.
+ * Activates the serial driver 1, PA9 and PA10 are routed to USART1.
*/
sdStart(&SD1, NULL);
- palSetPadMode(GPIOA, 9, PAL_MODE_ALTERNATE(7));
- palSetPadMode(GPIOA, 10, PAL_MODE_ALTERNATE(7));
+ palSetPadMode(GPIOA, 9, PAL_MODE_ALTERNATE(7)); /* USART1 TX. */
+ palSetPadMode(GPIOA, 10, PAL_MODE_ALTERNATE(7)); /* USART1 RX. */
/*
* Activates GPTs.
diff --git a/testhal/STM32F3xx/IRQ_STORM/mcuconf.h b/testhal/STM32F3xx/IRQ_STORM/mcuconf.h
index 5bc14b405..d2ee24c25 100644
--- a/testhal/STM32F3xx/IRQ_STORM/mcuconf.h
+++ b/testhal/STM32F3xx/IRQ_STORM/mcuconf.h
@@ -145,6 +145,20 @@
#define STM32_SPI_DMA_ERROR_HOOK(spip) chSysHalt()
/*
+ * UART driver system settings.
+ */
+#define STM32_UART_USE_USART1 FALSE
+#define STM32_UART_USE_USART2 FALSE
+#define STM32_UART_USE_USART3 FALSE
+#define STM32_UART_USART1_IRQ_PRIORITY 12
+#define STM32_UART_USART2_IRQ_PRIORITY 12
+#define STM32_UART_USART3_IRQ_PRIORITY 12
+#define STM32_UART_USART1_DMA_PRIORITY 0
+#define STM32_UART_USART2_DMA_PRIORITY 0
+#define STM32_UART_USART3_DMA_PRIORITY 0
+#define STM32_UART_DMA_ERROR_HOOK(uartp) chSysHalt()
+
+/*
* USB driver system settings.
*/
#define STM32_USB_USE_USB1 FALSE
diff --git a/testhal/STM32F3xx/IRQ_STORM/readme.txt b/testhal/STM32F3xx/IRQ_STORM/readme.txt
index 01a6b0cfe..05c37dd09 100644
--- a/testhal/STM32F3xx/IRQ_STORM/readme.txt
+++ b/testhal/STM32F3xx/IRQ_STORM/readme.txt
@@ -13,7 +13,8 @@ drivers in order to implement a system stress demo.
** Board Setup **
-None.
+- Connect an RS232 transceiver to pins PA9(TX) and PA10(RX).
+- Connect a terminal emulator to the transceiver (38400-N-8-1).
** Build Procedure **