2024-09-06 03:38 AM
how to dynamically set the phase voltages in the timer interrupt
2024-09-06 04:03 AM
1. Use the code insert feature instead of screen dumps.
2. Is your timer callback ever called? Maybe you started the timer without period interrupt enabled. Use the debugger to check it.
3. If it is called, use the debugger to check the values written to CCRx registers.
2024-09-06 04:20 AM - edited 2024-09-06 04:21 AM
1.Okay got it
2. Yes the timer callback is called i could see the elec angle value being updated.
this is my timer config where should i enable period interrupt
3. is there a way to check the ccr registers in the live expressions?
2024-09-06 05:14 AM
HAL_TIM_PWM_Start does not turn on any interrupts. Use HAL_TIM_PWM_Start_IT instead if you want callbacks to happen.
You can add TIM1->CCR1 to the live expressions to see it.
2024-09-06 05:26 AM - edited 2024-09-06 05:33 AM
its says failed to evaluate expression
Also i'm not using HAL_TIM_PWM_Start i'm using HAL_TIM_Base_Start_IT(&htim1) to start the interrupt @TDK
EDIT: tried using this
HAL_TIM_PWM_Start_IT(&htim1, TIM_CHANNEL_1);
HAL_TIM_PWM_Start_IT(&htim1, TIM_CHANNEL_2);
HAL_TIM_PWM_Start_IT(&htim1, TIM_CHANNEL_3);
but still same behaviour maybe if i could see whether if the ccr values changes in the live expression would be helpful to debug