This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28P550SG: EPWM DBCTL global load

Part Number: TMS320F28P550SG
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi Champs,

We found that when using Sysconfig to configure the global load function and enabling DBCTL's global load function, DBCTL.POLSEL and DBCTL.OUT_MODE registers are cleared to 0. 

During single-step debugging, DBCTL is configured correctly before running EPWM_enableGlobalLoadRegisters.

However, after executing EPWM_enableGlobalLoadRegisters, the registers are cleared to 0.

What is the reason for this?

Thanks!

 

Best Regards,

Julia

  • Julia,

    When operating in Global Load Mode, the configuration of DBCTL.POLSEL for multiple ePWM modules can be synchronized. Instead of individually configuring the polarity for each module, the global load mechanism allows for a simultaneous update of the shadow registers, including the DBCTL register, across all ePWM modules enabled for global load. This means that if DBCTL.POLSEL is part of the registers selected for global loading (via GLDCFG bits), then its value, along with other selected registers, will be transferred from the shadow register to the active register at the same event defined by GLDCTL[GLDMODE]This is to ensures consistent dead-band polarity settings across multiple ePWM modules. You can check that setting because that's master setting which will overwrite you individual ePWM setting.
    Regards,
    Sumit
  • Hi Sumit,

    I think this case is similar with  below thread.

    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000-microcontrollers---internal/f/c2000-microcontrollers---internal-forum/1388434/tms320f280039-aq-global-load-issue?tisearch=e2e-sitesearch&keymatch=global%25252525252520load%25252525252520AND%252525252525200#

    It seems that configuring EPWM_enableGlobalLoadRegisters indeed sets the corresponding registers to all zero, so the correct approach is to enable EPWM_enableGlobalLoadRegisters first and then initialize this register.

    In sysconfig's generation code, AQ module and the CC module are correct, EPWM_enableGlobalLoadRegisters is before AQ/CC configuration

    But for DB module, EPWM_enableGlobalLoadRegisters after the DB configuration, it will cause this issue.

    The order in which sysconfig generates code cannot be changed, so it seems that this will lead to DB configuration errors. Could you help to repair this? Now customer need to use susconfig.

    Thanks!

     

    Best Regards,

    Julia

  • If there is sysconfig error, you can quickly fix this by writing required APIs in main function after Board_init(); which is generated by sysconfig file. For example, in code below I overwrote the ePWM clock divider configuration by calling API after board init. Meanwhile I will report this bug internally to fix it.

    Regards,

    Sumit