Skip to main content
Renato Valentim
Associate III
January 13, 2021
Solved

Output Compare differences between TIM1 and TIM8 in STM32F767

  • January 13, 2021
  • 3 replies
  • 1609 views

Hello.

I want to use TIM8 instead of TIM1 to drive a WS2812B Led Strip together with DMA2 in STM32F767ZI. The code works fine with TIM1 but when I try to switch to TIM8 (which should have the same features), the interrupt handler TIM8_UP_TIM13_IRQHandler does not trigger anymore. Besides renaming everything from TIM1 to TIM8 I know I need to use TIM8_UP_TIM13 instead of TIM1_UP_TIM10 and also the strean/channel tie ins to the DMA2 also change. I have enclosed 2 pieces of code TIM1_WS2812B,c which works and TIM8_WS2812B.c where the TIM8 interrupt does not trigger. Aren't TIM1 and TIM8 suppose to work exactly the same way?

Thanks!

This topic has been closed for replies.
Best answer by Renato Valentim

Hello! I solved it. The problem was I was using still the wrong IRQ Handler for one of the DMA streams. I fixed it and now it works! Thanks! :)

3 replies

waclawek.jan
Super User
January 13, 2021

Troubleshoot as usually with interrupts which don't fire.

JW

TDK
January 13, 2021

I don't see you enable the update interrupt anywhere, in either file. HAL_TIM_Base_Start doesn't do it, and neither does __HAL_TIM_ENABLE. Could be missing something.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Renato Valentim
Renato ValentimAuthorBest answer
Associate III
January 14, 2021

Hello! I solved it. The problem was I was using still the wrong IRQ Handler for one of the DMA streams. I fixed it and now it works! Thanks! :)