Hi, Leon,
I see your concern, you want to sample the phase current simultaneouly for the two phase current channels, i think it is okay, but your hardware circuit has to meet the requirement.
As you know that the KV4x has only ONE ADC module, which has two ADC converter:ADCA and ADCB, in parallel mode with SIMULT bit set, the ADCA and ADCB sample simultaneously with sample0/sample8, sample1/sample9, sample2/sample10......, in the mode, you have to install one phase current channel to sample0, another phase current channe to sample8 so that the two phase current can be sampled simultaneously. The ADCA_CHx physical channel can be mapped to only sample0~7, ADCB_CHx physical channel can be mapped to only sample8~15, which phase current channel should be sampled is dependent on the motor voltage sector, in other words, you have to connect one phase current channel to both ADCA_CHx and ADCB_CHx, it is required from hardware perspective.
for example
I_phA ----------------->ADCA_CH0
I_phB------------------>ADCB_CH0
I_phC------------------>ADCA_CH1 and ADCB_CH1
if you sample I_phA/I_phB, ADCA_CH0 to sample[0], ADCB_CH0 to sample[8].
if you sample I_phA/I_phC, ADCA_CH0 to sample[0], ADCB_CH1 to sample[8].
if you sample I_phB/I_phC, ADCA_CH1 to sample[0], ADCB_CH0 to sample[8].
for the other parameter for example DC bus voltage, DC bus current, temperature..., you can use scan mode and mapped them to the other any channels, it is okay.
Regarding the trigger signal, I think it is not a problem, you can use FTM itself which generate 6 PWM signal or PDB to trigger ADC. In parallel scan mode, only one trigger event is required in one PWM cycle, for FTM, you use complementary mode of PWM to control PMSM, in the case, the odd FTM channel is not used, you can use the odd FTM channel to trigger ADC. For example, you can set the CH1TRIG bit in FTM0_EXTTRIG so that FTM0_CH1 can trigger ADC, you can set the FTM0_C1V to set the triggering point. from motor theory, the sampling point is in the middle of High logic of bottom PWM signal, you can set the FTM0_C1V based on above condition. If you use PDB to trigger ADC, it is okay.
Hope it can help you
BR
xiangjun rong