Part Number: TMS320F280025C
280025 Technical Reference Manual has description of XLINK feature below:
17.4.5 Simultaneous Writes to TBPRD and CMPx Registers Between ePWM Modules
For variable frequency applications, there is a need for simultaneous writes of TBPRD and CMPx registers
between ePWM modules. This prevents situations where a CTR = 0 or CTR = PRD pulse forces a shadow to
active load of these registers before all registers are updated between ePWM modules (resulting in some
registers being loaded from new shadow values while others are loaded from old shadow values). To support
this, an ePWM register linking scheme for TBPRD:TBPRDHR, CMPA:CMPAHR, CMPB:CMPBHR, CMPC, and
CMPD registers between PWM modules has been added.
For a particular ePWM module # A , user code writes “B+1”, to the linked register bit-field in EPWMXLINK. “B” is
the ePWM module # being linked to (that is, writes to the ePWM module “B” TBPRD:TBPRDHR,
CMPA:CMPAHR, CMPB:CMPBHR, or CMPC will simultaneously be written to corresponding register in ePWM
module “A”). For instance if ePWM3 EPWMXLINK register is configured so that CMPA:CMPAHR are linked to
ePWM1, then a write to CMPA:CMPAHR in ePWM 1 will simultaneously write the same value to
CMPA:CMPAHR in ePWM3. If ePWM4 also has its CMPA:CMPAHR registers linked to ePWM1, then a write to
ePWM 1 will write the same value to the CMPA:CMPAHR registers in both ePWM3 and ePWM4.
The register description for EPWMXLINK clearly explains the linked register bit-field values for corresponding
ePWM. An example of using the EPWMXLINK is linking ePWM2 CMPA with CMPA of ePWM1. In this case, a
write to CMPA of ePWM1 will also change the CMPA value for ePWM2.
- Could you point me to DRIVERLIB example project implementing this XLINK feature to write simultaneously to CMPA of 2 ePWM modules?
- If there is no such example project, some code snippet of implementing XLINK feature is also very helpful
Thanks!