aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARMCM4-STM32F407-DISCOVERY
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-11-20 18:04:07 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-11-20 18:04:07 +0000
commit9369d75516d5edb0e892f5ce1a5d7781917a64a5 (patch)
tree915f03f2946cd362862ece94d58873386b1889e8 /demos/ARMCM4-STM32F407-DISCOVERY
parentd4901e2acc5d3924ca766ed35949c0b90823d1fa (diff)
downloadChibiOS-9369d75516d5edb0e892f5ce1a5d7781917a64a5.tar.gz
ChibiOS-9369d75516d5edb0e892f5ce1a5d7781917a64a5.tar.bz2
ChibiOS-9369d75516d5edb0e892f5ce1a5d7781917a64a5.zip
STM32F4-Discovery demo working.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3516 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/ARMCM4-STM32F407-DISCOVERY')
-rw-r--r--demos/ARMCM4-STM32F407-DISCOVERY/main.c6
-rw-r--r--demos/ARMCM4-STM32F407-DISCOVERY/readme.txt4
2 files changed, 5 insertions, 5 deletions
diff --git a/demos/ARMCM4-STM32F407-DISCOVERY/main.c b/demos/ARMCM4-STM32F407-DISCOVERY/main.c
index 34893edda..e7e05d0bb 100644
--- a/demos/ARMCM4-STM32F407-DISCOVERY/main.c
+++ b/demos/ARMCM4-STM32F407-DISCOVERY/main.c
@@ -128,11 +128,11 @@ void adccb(ADCDriver *adcp, adcsample_t *buffer, size_t n) {
/* Changes the channels pulse width, the change will be effective
starting from the next cycle.*/
pwmEnableChannelI(&PWMD4, 0, PWM_FRACTION_TO_WIDTH(&PWMD4, 4096, avg_ch1));
-// pwmEnableChannelI(&PWMD4, 3, PWM_FRACTION_TO_WIDTH(&PWMD4, 4096, avg_ch2));
+ pwmEnableChannelI(&PWMD4, 3, PWM_FRACTION_TO_WIDTH(&PWMD4, 4096, avg_ch2));
/* SPI slave selection and transmission start.*/
-// spiSelectI(&SPID2);
-// spiStartSendI(&SPID2, ADC_GRP1_NUM_CHANNELS * ADC_GRP1_BUF_DEPTH, samples);
+ spiSelectI(&SPID2);
+ spiStartSendI(&SPID2, ADC_GRP1_NUM_CHANNELS * ADC_GRP1_BUF_DEPTH, samples);
chSysUnlockFromIsr();
}
diff --git a/demos/ARMCM4-STM32F407-DISCOVERY/readme.txt b/demos/ARMCM4-STM32F407-DISCOVERY/readme.txt
index ab3c5199a..b82983548 100644
--- a/demos/ARMCM4-STM32F407-DISCOVERY/readme.txt
+++ b/demos/ARMCM4-STM32F407-DISCOVERY/readme.txt
@@ -9,9 +9,9 @@ The demo runs on an ST STM32F4-Discovery board.
** The Demo **
The demo shows how to use the ADC, PWM and SPI drivers using asynchronous
-APIs. The ADC samples two channels (temperature sensor and PC0) and modulates
+APIs. The ADC samples two channels (temperature sensor and PC1) and modulates
the PWM using the sampled values. The sample data is also transmitted using
-the SPI port 1.
+the SPI port 2 (NSS=PB12, SCK=PB13, MISO=PB14, MOSI=PB15).
By pressing the button located on the board the test procedure is activated
with output on the serial port SD2 (USART2).