2021-08-05 07:49 AM
Hi all, I'm using a NUCLEO-G071RB board and I simply want to generate a variable frequency square wave. I started from project TIM_OCToggle found on the examples.
My problem is that TIM1 channel 1 has a fixed frequency and even if I change it through the sConfigOC struct with HAL functions, and I see changes in htim1->Instance registers after my function SetOutputFrequency(), nothing seems to happen on the ouput PA8, I see only some periods ON or OFF with the oscilloscope. Where are my errors? Is there a simple way to do what I need without using HAL libraries (portability and readability doesn't walk together...) ? Thanks in advance, Emanuele.
Solved! Go to Solution.
2021-08-06 04:11 AM
Many thanks MM..1, not it works. I didn't see HAL_TIM_OC_DelayElapsedCallback() function inside main.c. that is the clear solution.
Sorry for my mistake and thanks again for your time. Emanuele.
2021-08-06 04:18 AM
Now it works...
2021-08-06 04:44 AM
Perfecto and you can edit posts... ;)