2025-09-29 10:39 PM - last edited on 2025-09-30 12:10 AM by mƎALLEm
Hi everyone.
I am driving a Neopixel LED with a PWM signal in DMA mode using a timer. Even though all variables are the same, my code works with timer 3, but the same code doesn't work with timer 2 with the same timer configuration. Why could this be? I checked for a 16-32 bit difference, but they say it's not related to that. I have an STM32G431 Nucleo board. I tried all pin configurations for timer 2 channel 1, but it didn't work. İf it's normally and ı cant use this for neopixel, I will change timer but I use other timers for different jobs with different frequences. But ı dont thinks so.
2025-09-30 1:48 AM
@Andrew Neil wrote:Have you checked that the Nucleo board doesn't have something else on PA2 ?.
Yes, it does:
via: https://www.st.com/en/evaluation-tools/nucleo-g431kb.html#documentation
2025-09-30 4:21 AM
Sorry for late answer. I dont use PA2, and ı tried other pins in timer 2.
So what is the difference between the working case, and non-working case?
İt's not same signal. But I can't get a good visual because it's not a continuous periodic signal. Both of them.
2025-09-30 4:31 AM
@cereyanmühendisi wrote:Sorry for late answer. I dont use PA2
Sorry, yes - it's PA5
But do you have the board correct configured for that?
2025-09-30 4:38 AM
I cant understand, did u mean ı confused pins? if it is, probably no. Because ı can take basic pwm signal with same pins. I use this picture.