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.

[Q] 28069, piccolo - how to synchronize eCAP module with ePWM module



Hello, I would like to make eCAP module synchronized with ePWM module in 28069.

However, I cannot find how to make it with the information in the Technical Reference Manual.

From 3.2.2.3.3, Time-Base Counter Synchronization part, 28069 is constructed with the structure in Fig. 3-7, Time-Base Counter Synchronization Scheme 1.

In FIg. 3-7. eCAP1 module can be synchronized with ePWM1 by using EPWM1SYNCO signal.

Q1. Here, could you tell me how I can enable this synchronization? Just enabling EPWM1SYNCO and SYNCI in eCAP1 module make it possible?

       Any connections in hardware is required?

Q2. How can I make eCAP1, ..., eCAPn modules synchronized?

        From Fig. 6-6, Details of the Counter and Synchronization Block, it can be noted that SYNCI signal can be passed through and used as SYNCO signal.

        In 28069, sync signals of eCAP1, ..., eCAPn modules are chained like ePWM modules?

Thank you very much in advance.

  • Hello,

    What you want to do is definitely feasible.

    Jongwoo Kim said:

    Q1. Here, could you tell me how I can enable this synchronization? Just enabling EPWM1SYNCO and SYNCI in eCAP1 module make it possible?

           Any connections in hardware is required?

    [BL] As you mention, enabling your PWM SYNCO and enabling your eCAP's SYNCI should be done.  PWM1 should also be configured to ignore synchronization inputs (assuming that you are not using an external synchronization pulse)

    In particular:
    PWM1: Disable PHSEN
    PWM1: Set SYNCOSEL accordingly in order to generate a synch pulse where you want one
    CAP1: Enable SYNCI_EN

    No hardware connections are needed.

    Jongwoo Kim said:

    Q2. How can I make eCAP1, ..., eCAPn modules synchronized?

            From Fig. 6-6, Details of the Counter and Synchronization Block, it can be noted that SYNCI signal can be passed through and used as SYNCO signal.

            In 28069, sync signals of eCAP1, ..., eCAPn modules are chained like ePWM modules?



    [BL] Yes, they are chained.  CAP1 -> 2 -> 3 -> 4

    Assuming that PWM1 is generating the synchronization pulse for all your eCAPs, you just need to enable each CAP modules' SYNCI_EN and set each CAP modules' SYNCOSEL to pass SYNCI to the next CAP module.


    NOTE: Some oddities can occur if you do not disable PWM1's PHSEN.  If you enable PWM1's PHSEN, the PWM advisory in the F2806x errata document will come into affect.


    Thank you,
    Brett

  • Thank you very much, Brett.

    I think my question is answered. Here, I have two more questions, because PHSEN is enabled in ePWM1 module.

    In my test board, ePWM1 is synchronized with DCAEVT signal and its TBPHS is 0.

    SYNCOSEL is set to make sync pulse at TBCTR = 0.

    ECAP1 module is operating in delta mode with COMP1OUT signal.

    ECAP2 module is synchronized with ePWM1 by using SYNCI (from ePWM1 when TBCTR = 0).

    In my test board, it seems this setting is working well. I confirmed the operation with scope, and eCAP registers return correct values .

    Also, the errata tells me that only software-forced synchronizations would not be delivered in some conditions.

    In this case, could you tell me if there would be some problem with my setting?

    This is a summary of my question.

    Q1.

    ePWM1: synchronized with DCAEVT(COMP1OUT), TBPHS = 0, SYNCO pulse when TBCTR = 0

    eCAP1: delta mode with COMP1OUT, not synchronized

    eCAP2: capture mode, synchronized with ePWM1

    In this case, do you expect some problem with my setting?

    Q2.

    This is one another question. I would like to use only CAP1 register in eCAP module.

    In other words, I would like to update CAP1 register at the every rising edge of eCAP2 pin.

    Would it be possible?

    Thank you very much in advance.

    Sincerely,

  • Jongwoo,

    Q1: eCAP1,2 will stay synchronized with PWM1 in this situation.  However, I might recommend allowing EPWMSYNCI to go through a GPIO pin and force it low via a pull-down resistor externally.   This will keep PWM1's EPWMxSYNCI signal from forcing EPWM1's phase synchronization signal high and allow DCAEVT to always successfully create synchronization. (the root cause of the errata is that the synchi input of PWM1 can float high if it isn't pulled low externally)


    Q2: I don't believe so, but I must admit that I haven't used the eCAP module enough to be sure.  Perhaps someone else will comment.


    Thank you,
    Brett