diff options
author | marcoveeneman <marco-veeneman@hotmail.com> | 2016-07-05 23:15:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-05 23:15:35 +0200 |
commit | 0131027151415075106a82984b441ebe26d90047 (patch) | |
tree | d87057000c4b3bea5ddf3a4fffabc838a2695b4b /os/hal/ports/TIVA/LLD/hal_pwm_lld.c | |
parent | 2de67e2f4a268eae072c5fd76a1b160124cee4f6 (diff) | |
parent | 0e86736605157335b7df60d8629739451d478646 (diff) | |
download | ChibiOS-Contrib-0131027151415075106a82984b441ebe26d90047.tar.gz ChibiOS-Contrib-0131027151415075106a82984b441ebe26d90047.tar.bz2 ChibiOS-Contrib-0131027151415075106a82984b441ebe26d90047.zip |
Merge pull request #86 from marcoveeneman/master
Various Tiva fixes
Diffstat (limited to 'os/hal/ports/TIVA/LLD/hal_pwm_lld.c')
-rw-r--r-- | os/hal/ports/TIVA/LLD/hal_pwm_lld.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/os/hal/ports/TIVA/LLD/hal_pwm_lld.c b/os/hal/ports/TIVA/LLD/hal_pwm_lld.c index b223a9c..ad7c587 100644 --- a/os/hal/ports/TIVA/LLD/hal_pwm_lld.c +++ b/os/hal/ports/TIVA/LLD/hal_pwm_lld.c @@ -341,6 +341,10 @@ void pwm_lld_start(PWMDriver *pwmp) #if TIVA_PWM_USE_PWM0 if (&PWMD1 == pwmp) { SYSCTL->RCGCPWM |= (1 << 0); + + while (!(SYSCTL->PRPWM & (1 << 0))) + ; + nvicEnableVector(TIVA_PWM0FAULT_NUMBER, TIVA_PWM_PWM0_FAULT_IRQ_PRIORITY); nvicEnableVector(TIVA_PWM0GEN0_NUMBER, TIVA_PWM_PWM0_0_IRQ_PRIORITY); @@ -353,6 +357,10 @@ void pwm_lld_start(PWMDriver *pwmp) #if TIVA_PWM_USE_PWM1 if (&PWMD2 == pwmp) { SYSCTL->RCGCPWM |= (1 << 1); + + while (!(SYSCTL->PRPWM & (1 << 1))) + ; + nvicEnableVector(TIVA_PWM1FAULT_NUMBER, TIVA_PWM_PWM1_FAULT_IRQ_PRIORITY); nvicEnableVector(TIVA_PWM1GEN0_NUMBER, TIVA_PWM_PWM1_0_IRQ_PRIORITY); |