aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32F37x
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-03-16 10:34:25 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-03-16 10:34:25 +0000
commit216f0d6ace9bc674c9399dd22b950d42182e1bf6 (patch)
tree2d7f294264eb618a2ab88bef45153f9e282df192 /testhal/STM32F37x
parent56a1ab369f44308f8945384504c15657c3039b8d (diff)
downloadChibiOS-216f0d6ace9bc674c9399dd22b950d42182e1bf6.tar.gz
ChibiOS-216f0d6ace9bc674c9399dd22b950d42182e1bf6.tar.bz2
ChibiOS-216f0d6ace9bc674c9399dd22b950d42182e1bf6.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5439 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F37x')
-rw-r--r--testhal/STM32F37x/PWM-ICU/readme.txt4
-rw-r--r--testhal/STM32F37x/SPI/main.c9
-rw-r--r--testhal/STM32F37x/SPI/readme.txt2
3 files changed, 5 insertions, 10 deletions
diff --git a/testhal/STM32F37x/PWM-ICU/readme.txt b/testhal/STM32F37x/PWM-ICU/readme.txt
index f1231603e..b1acb879a 100644
--- a/testhal/STM32F37x/PWM-ICU/readme.txt
+++ b/testhal/STM32F37x/PWM-ICU/readme.txt
@@ -4,11 +4,11 @@
** TARGET **
-The demo runs on an STMicroelectronics STM32F3-Discovery board.
+The demo runs on an STMicroelectronics STM32373C-EVAL board.
** The Demo **
-The demo runs on an STMicroelectronics STM32373C-EVAL board.
+The application demonstrates the use of the STM32F37x PWM and ICU drivers.
** Board Setup **
diff --git a/testhal/STM32F37x/SPI/main.c b/testhal/STM32F37x/SPI/main.c
index 9cb02763d..e43cdc32c 100644
--- a/testhal/STM32F37x/SPI/main.c
+++ b/testhal/STM32F37x/SPI/main.c
@@ -59,7 +59,7 @@ static msg_t spi_thread_1(void *p) {
chRegSetThreadName("SPI thread 1");
while (TRUE) {
spiAcquireBus(&SPID2); /* Acquire ownership of the bus. */
- palSetPad(GPIOC, GPIOC_LED2); /* LED ON. */
+ palClearPad(GPIOC, GPIOC_LED2); /* LED ON. */
spiStart(&SPID2, &hs_spicfg); /* Setup transfer parameters. */
spiSelect(&SPID2); /* Slave Select assertion. */
spiExchange(&SPID2, 512,
@@ -80,7 +80,7 @@ static msg_t spi_thread_2(void *p) {
chRegSetThreadName("SPI thread 2");
while (TRUE) {
spiAcquireBus(&SPID2); /* Acquire ownership of the bus. */
- palClearPad(GPIOC, GPIOC_LED2); /* LED OFF. */
+ palSetPad(GPIOC, GPIOC_LED2); /* LED OFF. */
spiStart(&SPID2, &ls_spicfg); /* Setup transfer parameters. */
spiSelect(&SPID2); /* Slave Select assertion. */
spiExchange(&SPID2, 512,
@@ -126,15 +126,10 @@ int main(void) {
/*
* SPI2 I/O pins setup.
*/
- palSetPadMode(GPIOB, 13, PAL_MODE_ALTERNATE(5) |
- PAL_STM32_OSPEED_HIGHEST); /* New SCK. */
palSetPadMode(GPIOB, 14, PAL_MODE_ALTERNATE(5) |
PAL_STM32_OSPEED_HIGHEST); /* New MISO. */
palSetPadMode(GPIOB, 15, PAL_MODE_ALTERNATE(5) |
PAL_STM32_OSPEED_HIGHEST); /* New MOSI. */
- palSetPadMode(GPIOB, 12, PAL_MODE_OUTPUT_PUSHPULL |
- PAL_STM32_OSPEED_HIGHEST); /* New CS. */
- palSetPad(GPIOB, 12);
/*
* Prepare transmit pattern.
diff --git a/testhal/STM32F37x/SPI/readme.txt b/testhal/STM32F37x/SPI/readme.txt
index 6475d632b..ebf5f3563 100644
--- a/testhal/STM32F37x/SPI/readme.txt
+++ b/testhal/STM32F37x/SPI/readme.txt
@@ -4,7 +4,7 @@
** TARGET **
-The demo runs on an STMicroelectronics STM32F3-Discovery board.
+The demo runs on an STMicroelectronics STM32373C-EVAL board.
** The Demo **