i learn and read the example program. in 3_bldc_quadrature_encoder.mcp, events.c
the following code, i dont understand.
extern const pwm_sChannelControl bldcCommutationTableComp[8] = {
{ MC_PWM_ALL_SIGNALS, PWM_ZERO_MASK },
{ (MC_PWM_SIGNAL_3 | MC_PWM_SIGNAL_2), (PWM_SWAP_1 | PWM_SWAP_0) },
{ (MC_PWM_SIGNAL_1 | MC_PWM_SIGNAL_0), (PWM_SWAP_2 | PWM_SWAP_0) },
{ (MC_PWM_SIGNAL_5 | MC_PWM_SIGNAL_4), (PWM_SWAP_0) },
{ (MC_PWM_SIGNAL_5 | MC_PWM_SIGNAL_4), (PWM_SWAP_2 | PWM_SWAP_1) },
{ (MC_PWM_SIGNAL_1 | MC_PWM_SIGNAL_0), (PWM_SWAP_1) },
{ (MC_PWM_SIGNAL_3 | MC_PWM_SIGNAL_2), (PWM_SWAP_2) },
{ MC_PWM_ALL_SIGNALS, PWM_ZERO_MASK }
};
who can explain it for me with details. in the up codes , these variables represent what meaning, which one swap which?
Read the codes make me feel faint.