SLUUDM5 March 2026 MSPM0G1507 , MSPM0G1519 , MSPM0G3507 , MSPM0G3519
For the case that the PWM output channel mapping in hardware is different, users should first refer to Section 8.3.1.1 to modify the IO PIN used in SysConfig. Then position to gateDriver.h file to overwrite the HAL layer macro.
For example, if users have a new mapping table below:
| Board Macro | IO PIN | PWM Channel | HAL Layer Macro |
|---|---|---|---|
| INHA | TBD (Set in SysConfig) | TIMA0_C0 | FOC_PWMA0_U_IDX |
| INHB | TBD (Set in SysConfig) | TIMA0_C1 | FOC_PWMA0_V_IDX |
| INHC | TBD (Set in SysConfig) | TIMA0_C2 | FOC_PWMA0_W_IDX |
| NA | NA | TIMA0_C3 | FOC_PWMA0_ADC_TRIG_IDX |
The corresponding modifications in gateDriver.h file are shown in the following figure.
The remaining unused PWM output channel is always used to trigger ADC sampling in dual or three shunt current sensing method. And the ADC trigger EVENT should be set as the event of the trigger PWM channel.
For single shunt current sensing method, FOC application uses the secondary TIMA1 to trigger the ADC, so that no trigger channel modification is required.