I am working to develop a motor controller based upon a sensorless PMSM FOC SDK example program running on a TWR KV58F220M development board with TWR-MC-LV3PH motor driver board. The HSADC is used to measure the phase currents. We want to measure all three phase currents simultaneously, so we can assume a balanced motor load.
Apparently, the KV5 MCU can measure up to 4 simultaneous 12-bit samples (two in HSADC0 and two in HSADC1 in parallel sample mode). However, the example program choose to measure only two phases and calculate the third. Which two phases are measured depends on the SVM sector. The program comments stipulate that the A-phase is to be measured in both HSADC0 and HSADC1, while the B-phase is measured in HSADC 1 and the C-phase is measured in HSADC0. The comments further state that the AUX measurement and DC bus V must be on different HSADC modules. My question is why not measure all three phase currents at once. Let's say, A-phase and B-phase in HSADC0 and C-phase and Vbus in HSADC1 and capture all four every measurement cycle?
What is the reason the three phase currents were distributed in such a way to the two HSADC modules (one of the phases is required to appear in both modules)?
the reason only two phase currents are sampled at every PWM period is using common application framework for all KV MCU's and boards (Tower, Freedom, HVP). Only KV58 and KE18 MCUs have more than 2 ADCs.
You're right KV58 is capable to measure simultaneously up to 4 samples, but from compatibility reason we use the same application concept as for KV46.
You can replace the original 2-phase ADC driver by your own sampling three current at one instants.
Currently we don't have a plan to update the reference PMSM project by 3-phase sampling.