MCPWM SYNCHRONIZATION

Brief

Demonstrate the synchronization feature with phase shift.

Details

The example sets up the following MCPMWs to showcase the Deadband features, as follows,

  • MCPWM_0 - This MCPWM module is taken as the reference for MCPWM_1 with 0 degree phase shift

  • MCPWM_1 - This MCPWM module is phase shifted by 5000 cycles

  • MCPWM_2 - This MCPWM module is taken as the reference for MCPWM_3 with 0 degree phase shift

  • MCPWM_3 - This MCPWM module is phase shifted by 6667 cycles

Block diagram Block diagram (pins applicable for LaunchPad)

Validation:

Output waveform

Peripherals used

  • MCPWM
    4 instances to show synchronization feature.

    • TBCLK : 250MHz

    • MODE : UpCount

    • PRD : 20000 cycles

    • FREQUENCY : 12.5KHz

    • Actions on xA : High on Counter equals Zero. Low on CMPA hit

    • Actions on xB : High on Counter equals Zero. Low on CMPB hit

    • DUTY of xA : 50%

    • DUTY of xB : 25%

    • Sync Config for MCPWM_0:

      • Phase shift : Without phase shift as sync source

      • SyncOut : Every Counter equals Period event

    • Sync Config for MCPWM_1:

      • SyncIn Source : MCPWM0, with phase shift load enabled

      • Phase shift : 5000 cycles (90-degree)

    • Sync Config for MCPWM_2:

      • Phase shift : Without phase shift as sync source

      • SyncOut : Every Counter equals Period event

    • Sync Config for MCPWM_3:

      • SyncIn Source : MCPWM2, with phase shift load enabled

      • Phase shift : 6667 cycles (120-degree)

External connections

  • Connect: BoosterPack header J4 pin 31 (PA11) (MCPWM0_1A) to Scope/Logic analyzer

  • Connect: BoosterPack header J4 pin 32 (PA12) (MCPWM0_1B) to Scope/Logic analyzer

  • Connect: BoosterPack header J4 pin 35 (PA25) (MCPWM1_3A) to Scope/Logic analyzer

  • Connect: BoosterPack header J2 pin 12 (PB12) (MCPWM1_3B) to Scope/Logic analyzer

  • Connect: BoosterPack header J1 pin 10 (PA22) (MCPWM2_2A) to Scope/Logic analyzer

  • Connect: BoosterPack header J1 pin 9 (PA23) (MCPWM2_2B) to Scope/Logic analyzer

  • Connect: BoosterPack header J4 pin 33 (PB6) (MCPWM3_3A) to Scope/Logic analyzer

  • Connect: BoosterPack header J4 pin 34 (PB7) (MCPWM3_3B) to Scope/Logic analyzer