Search found 3 matches
- Wed Apr 17, 2024 10:48 pm
- Forum: General discussion
- Topic: How to get to the timer registers to setup center aligned
- Replies: 2
- Views: 3150
Re: How to get to the timer registers to setup center aligned
Seems like I am having a wee chat with myself ... :lol: I have managed to get one complementary channel going with deadband, by using a combo of hardware timer and register access, this is what I have to far: TIM_TypeDef *Instance = (TIM_TypeDef *)pinmap_peripheral(digitalPinToPinName(pinAH), PinMap...
- Wed Apr 17, 2024 3:09 am
- Forum: General discussion
- Topic: How to get to the timer registers to setup center aligned
- Replies: 2
- Views: 3150
Re: How to get to the timer registers to setup center aligned
I think I have made some progress, this is what I have so far using the HAL layer: TIM_HandleTypeDef htim1; TIM_OC_InitTypeDef *sConfig = nullptr; void Setup() { // some other setup stuff HAL_TIM_PWM_Init(&htim1); HAL_TIM_PWM_ConfigChannel(&htim1,sConfig,TIM_CHANNEL_1); HAL_TIM_PWM_ConfigCha...
- Tue Apr 16, 2024 10:11 pm
- Forum: General discussion
- Topic: How to get to the timer registers to setup center aligned
- Replies: 2
- Views: 3150
How to get to the timer registers to setup center aligned
Hi all, I am very new to stm32duino. I have installed the arduino framework in platformio. So far I have managed to get the stm32f103 bluepill to run at 72Mhz by some PLL code, and I have a PWM with interrupts working. However for my motor controller project I need 3-phase pwm off the same timer (TI...