diff options
| author | Bernard Xiong <[email protected]> | 2019-09-29 16:54:08 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-09-29 16:54:08 +0800 |
| commit | 076addc9ea0d47ff5520032c47df2153e9c2eb05 (patch) | |
| tree | 4a800700cbdb479bf0b5d197dda2dd72ca6f8944 | |
| parent | 6b65d2662abcb518c61c1d1bd7227b9f2ec429dd (diff) | |
| parent | 383429e3b9fcf197098a320ccb874db9109c16f6 (diff) | |
Merge pull request #3006 from jiezhi320/master
fix bug when use HWTIMER_MODE_PERIOD
| -rw-r--r-- | bsp/imxrt/libraries/drivers/drv_hwtimer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bsp/imxrt/libraries/drivers/drv_hwtimer.c b/bsp/imxrt/libraries/drivers/drv_hwtimer.c index c1a4767cb8..f29c4debbb 100644 --- a/bsp/imxrt/libraries/drivers/drv_hwtimer.c +++ b/bsp/imxrt/libraries/drivers/drv_hwtimer.c @@ -108,7 +108,7 @@ static rt_err_t imxrt_hwtimer_start(rt_hwtimer_t *timer, rt_uint32_t cnt, rt_hwt RT_ASSERT(timer != RT_NULL); - hwtimer_dev->CR |= (mode == HWTIMER_MODE_PERIOD) ? GPT_CR_FRR_MASK : 0U; + hwtimer_dev->CR |= (mode != HWTIMER_MODE_PERIOD) ? GPT_CR_FRR_MASK : 0U; GPT_SetOutputCompareValue(hwtimer_dev, kGPT_OutputCompare_Channel1, cnt); |
