You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2019/09/10 02:45:02 UTC

[mynewt-core] 03/03: stm32/hal_timer: Remove OC1 channel handling

This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit a261d6c1ef7eb7b719ebc02b2528d01b6cdb55f4
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Tue Sep 3 15:52:07 2019 +0200

    stm32/hal_timer: Remove OC1 channel handling
    
    Configuration of TIMx channel 1 does not seem to be handled
    in the code it would require some additional calls to ST hal
    which is not present.
    
    Enabling/disabling routing signal to output pin did not look
    like intentional.
---
 hw/mcu/stm/stm32_common/src/hal_timer.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/hw/mcu/stm/stm32_common/src/hal_timer.c b/hw/mcu/stm/stm32_common/src/hal_timer.c
index b7840e7..64538e9 100644
--- a/hw/mcu/stm/stm32_common/src/hal_timer.c
+++ b/hw/mcu/stm/stm32_common/src/hal_timer.c
@@ -96,7 +96,6 @@ stm32_tmr_cbs(struct stm32_hal_tmr *tmr)
     if (ht) {
         tmr->sht_regs->CCR1 = ht->expiry & 0xFFFFU;
     } else {
-        TIM_CCxChannelCmd(tmr->sht_regs, TIM_CHANNEL_1, TIM_CCx_DISABLE);
         tmr->sht_regs->DIER &= ~TIM_DIER_CC1IE;
     }
 }
@@ -739,7 +738,6 @@ hal_timer_start_at(struct hal_timer *timer, uint32_t tick)
         tmr->sht_regs->DIER |= TIM_DIER_CC1IE;
     } else {
         if (timer == TAILQ_FIRST(&tmr->sht_timers)) {
-            TIM_CCxChannelCmd(tmr->sht_regs, TIM_CHANNEL_1, TIM_CCx_ENABLE);
             tmr->sht_regs->CCR1 = timer->expiry & 0xFFFFU;
             tmr->sht_regs->DIER |= TIM_DIER_CC1IE;
         }
@@ -782,8 +780,6 @@ hal_timer_stop(struct hal_timer *timer)
             if (ht) {
                 tmr->sht_regs->CCR1 = ht->expiry & 0xFFFFU;
             } else {
-                TIM_CCxChannelCmd(tmr->sht_regs, TIM_CHANNEL_1,
-                  TIM_CCx_DISABLE);
                 tmr->sht_regs->DIER &= ~TIM_DIER_CC1IE;
             }
         }