2022-06-26 05:18 PM
hello friends)))) I bought a new stm32H743 for familiarization and got confused how to implement PWM on HRTIM. I'm trying to do PWM on timer B. configured GPIO_PC8 to AF1 in GPIOx_AFRH. everything is fine there.
HRTIM_B_PERxR==2000
HRTIM_B_CMP1xR==2000
HRTIM_B_SETx1R installed bits PER and CMP1
HRTIM_RSTx1R installed bits PER and CMP1
HRTIM_OENR installed TB1OEN
HRTIM_TIMxCR installed CONT
HRTIM_MCR installed TBCEN
what else do I need for PWM to work?
2022-06-26 07:40 PM
2022-06-26 09:02 PM
I don't use libraries. can you tell me what else needs to be included in the registers?do you need dead time?
2022-06-27 09:26 AM
how can you understand how the HRTIM timer works if most of it is hidden from you in the header files of the "C" language? I do not know where to ask more. STM support is silent as always. if there was good documentation, I wouldn't ask.
2022-06-27 11:02 AM
Read: RM0433 Reference manual
You don't have to use libraries, just study each function call that HAL_ driver does for you, and set each register manually. Doing so you are wasting a lot of time, and need to be careful to set registers in correct order - some hardware like DMA very stubborn in this aspect, it's even wouldn't tell you what is correct sequence it's expecting.
2022-06-27 11:49 AM
I don't use HRTIM nor 'H7, but my mantra is, read out and check content of relevant registers (HRTIM and GPIO).
You probably should see some counter changing, too.
JW
2022-06-27 03:44 PM
ок