git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10230 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
Rocco Marco Guglielmi 2017-05-29 19:43:54 +00:00
parent ceb326112d
commit 2045fd61b9
2 changed files with 19 additions and 17 deletions

View File

@ -819,7 +819,7 @@ void gpt_lld_stop(GPTDriver *gptp) {
*/
void gpt_lld_start_timer(GPTDriver *gptp, gptcnt_t interval) {
gptp->tim->ARR = (uint32_t)(interval - 1); /* Time constant. */
gptp->tim->ARR = (uint32_t)(interval); /* Time constant. */
gptp->tim->EGR = STM32_TIM_EGR_UG; /* Update event. */
gptp->tim->CNT = 0; /* Reset counter. */
@ -861,7 +861,7 @@ void gpt_lld_stop_timer(GPTDriver *gptp) {
*/
void gpt_lld_polled_delay(GPTDriver *gptp, gptcnt_t interval) {
gptp->tim->ARR = (uint32_t)(interval - 1); /* Time constant. */
gptp->tim->ARR = (uint32_t)(interval); /* Time constant. */
gptp->tim->EGR = STM32_TIM_EGR_UG; /* Update event. */
gptp->tim->SR = 0; /* Clear pending IRQs. */
gptp->tim->CR1 = STM32_TIM_CR1_OPM | STM32_TIM_CR1_URS | STM32_TIM_CR1_CEN;

View File

@ -161,6 +161,8 @@
- RT: Merged RT4.
- NIL: Merged NIL2.
- NIL: Added STM32F7 demo.
- HAL: Fixed wrong ARR initialization in STM32 GPT driver (bug #843)(backported
to 16.1.9).
- HAL: Fixed wrong configuration in STM32L4xx GPT-ADC demo (bug #842)(backported
to 16.1.9).
- HAL: Fixed invalid DMA channels for STM32F334 ADC2 (bug #840)(backported