From e40ae9763814661fa99e2b546e4f2562fb48650b Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 30 Aug 2014 13:54:04 +0000 Subject: Enhanced PWM driver git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7208 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- testhal/STM32/STM32F37x/PWM-ICU/main.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'testhal/STM32/STM32F37x/PWM-ICU/main.c') diff --git a/testhal/STM32/STM32F37x/PWM-ICU/main.c b/testhal/STM32/STM32F37x/PWM-ICU/main.c index ccc877f3f..0178af14a 100644 --- a/testhal/STM32/STM32F37x/PWM-ICU/main.c +++ b/testhal/STM32/STM32F37x/PWM-ICU/main.c @@ -89,6 +89,7 @@ int main(void) { * The two pins have to be externally connected together. */ pwmStart(&PWMD5, &pwmcfg); + pwmEnablePeriodicNotification(&PWMD5); palSetPadMode(GPIOC, 0, PAL_MODE_ALTERNATE(2)); 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(&PWMD5, 0, PWM_PERCENTAGE_TO_WIDTH(&PWMD5, 7500)); + pwmEnableChannelNotification(&PWMD5, 0); chThdSleepMilliseconds(5000); /* -- cgit v1.2.3