2025-10-20 12:27 PM
Hi,
Using STM32F429VET trying to achieve FOC with single shunt resistor over 3phase bldc motor.
I am using TIM1 and corresponding CC2, CC3, CC4 as PWM channels. CC1 is used to trigger ADC in regular mode reading current over shunt resistor in S1 and S2. The PCLK2 is at 96MHz, ADC divided by 4. That all seems not to be enough.
I am struggling to achieve precise and yet fast enough reading. The final PWM frequency is 20kHz in center aligned mode. The motor has to move in 1/100 duty but that seems to be unable to achieve because of timing windows to read ADC. Dead time is at overall 500ns, given that the overall 25uS I have in center aligned mode, all time is crucial.
I am already doing all the magic stuff like using DMA to trigger ADC reading based on CC1, DMA to do TIM CCx updates upon Update events (shadowing CCx).
I heard about FOC control from MC Workbench but am I supposed to do incredible stuff to create my own board and inverter through declarations to get it? This seems ridicoulous when ST isn't offering something more usable for custom precise controls. What is the point showing a few random EVAL boards?