2023-08-24 07:19 PM
Hi, I am figuring out how 6-step algorithm works.
I generated a project using 6-step algorithm with B-G431B-ESC1.
In the ADC settings,
ADC1 consisted of 2 regular channel (Vbus, Temp) and 1 Injected channel (Bemf_W)
So I thought ADC2 should be consisted of 2 injected channel (BEMF_U and BEMF_V).
However, there was only 1 Injected Channel enabled (Channel 17 -> BEMF_U)
here's screenshot for stm32cubemx
Can someone tell me is it not necessary to sample Bemf_V? or is there an additional code to sample this?
Thanks
Solved! Go to Solution.
2023-09-04 02:33 AM
Hello JKong.3,
As you mentioned, the ADC2 channel 5 (the one used for BEMF_V as you can see on the Pinout on CubeMx) is not configured in ADC_Injected_ConversionMode. However, it does not mean we do not sample BEMF_V : the ADC is reconfigured by FW depending on which step the rotor is. Even though the sampling time is not configured via CubeMx, it is then hardcoded in g4xx_bemf_ADC_fdbk in BADC_Init().
2023-09-04 02:33 AM
Hello JKong.3,
As you mentioned, the ADC2 channel 5 (the one used for BEMF_V as you can see on the Pinout on CubeMx) is not configured in ADC_Injected_ConversionMode. However, it does not mean we do not sample BEMF_V : the ADC is reconfigured by FW depending on which step the rotor is. Even though the sampling time is not configured via CubeMx, it is then hardcoded in g4xx_bemf_ADC_fdbk in BADC_Init().