fix bug when use HWTIMER_MODE_PERIOD

This commit is contained in:
jiezhi320 2019-08-25 20:58:11 +08:00 committed by GitHub
parent f87dd2e7c4
commit 383429e3b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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);