diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-08-30 13:54:04 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-08-30 13:54:04 +0000 |
commit | e40ae9763814661fa99e2b546e4f2562fb48650b (patch) | |
tree | f3157c29964739ef5e7fcc46688861d63c5b9313 /testhal/STM32/STM32L1xx/PWM-ICU | |
parent | a2ee0679d1525a80cdaccc020413bfbb61d9b070 (diff) | |
download | ChibiOS-e40ae9763814661fa99e2b546e4f2562fb48650b.tar.gz ChibiOS-e40ae9763814661fa99e2b546e4f2562fb48650b.tar.bz2 ChibiOS-e40ae9763814661fa99e2b546e4f2562fb48650b.zip |
Enhanced PWM driver
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7208 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32/STM32L1xx/PWM-ICU')
-rw-r--r-- | testhal/STM32/STM32L1xx/PWM-ICU/.cproject | 1 | ||||
-rw-r--r-- | testhal/STM32/STM32L1xx/PWM-ICU/main.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/testhal/STM32/STM32L1xx/PWM-ICU/.cproject b/testhal/STM32/STM32L1xx/PWM-ICU/.cproject index b96ec18ee..077ea250c 100644 --- a/testhal/STM32/STM32L1xx/PWM-ICU/.cproject +++ b/testhal/STM32/STM32L1xx/PWM-ICU/.cproject @@ -48,4 +48,5 @@ </scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="refreshScope"/>
</cproject>
diff --git a/testhal/STM32/STM32L1xx/PWM-ICU/main.c b/testhal/STM32/STM32L1xx/PWM-ICU/main.c index 9e5955e4a..654f23379 100644 --- a/testhal/STM32/STM32L1xx/PWM-ICU/main.c +++ b/testhal/STM32/STM32L1xx/PWM-ICU/main.c @@ -89,6 +89,7 @@ int main(void) { * The two pins have to be externally connected together.
*/
pwmStart(&PWMD2, &pwmcfg);
+ pwmEnablePeriodicNotification(&PWMD2);
palSetPadMode(GPIOA, 15, PAL_MODE_ALTERNATE(1));
icuStart(&ICUD3, &icucfg);
palSetPadMode(GPIOC, 6, PAL_MODE_ALTERNATE(2));
@@ -99,6 +100,7 @@ int main(void) { * Starts the PWM channel 0 using 75% duty cycle.
*/
pwmEnableChannel(&PWMD2, 0, PWM_PERCENTAGE_TO_WIDTH(&PWMD2, 7500));
+ pwmEnableChannelNotification(&PWMD2, 0);
chThdSleepMilliseconds(5000);
/*
|