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.

TMS320F28379S: Question about CLB

Part Number: TMS320F28379S

Dear team:

My client connects PWM6 to CLB via X-Bar and sets CLB to capture falling edge. After capturing the falling edge of the input, it was found that the falling edge of some PWM6 waveforms was not captured successfully with an oscilloscope test.

But the same configuration can be captured correctly with PWM2 test (external hardware is also the same), for CLB, is there any difference between PWM2 and PWM6?

Best regards

  • Green, 

    If everything is configured the same, then I don't think there should be a difference.  Are they seeing some missing edges or no edges at all?

    Regards

    Lori

  • Dear Lori:

    Customer feedback that his code can work well on F28379D, but when he use this code on F28379S, The CLB fails to capture the falling edge of PWM wave as circled in the figure below.

    The Yellow waveform is PWM. The pink part is the waveform of PWM9A captured by CLB.

    Below is his code.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    #include "driverlib.h"
    #include "device.h"
    #include "clb_config.h"
    #include "clb.h"
    /*
    * f = 100M/(2 * EPWM2_TIMER_TBPRD) = 50k
    * 50%
    */
    #define EPWM6_TIMER_TBPRD 1000U //<
    #define EPWM6_CMPA 500U //< A 使
    #define EPWM6_CMPB 500U //< B 使
    void initEPWM6(void);
    void initCLB1(void);
    void initCLB2(void);
    bool GP_0 = false;
    void delay(int ms){
    int i, j;
    for( i = 0; i < 200; i++)
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Best regards

  • Green,

    Since it is only some samples missing, I suspect that it is due to the sampling rate of the oscilloscope being too low.  The pulses are 1 CLB clock wide so 10ns.  For example if the sampling rate is every 20ns, then a pulse can be completely missed. Per Nyquist, the sampling rate needs to be at least twice the rate of the signal's highest frequency component.   

    On F2837xD waveform, the sampling rate of the scope was likely set higher or they lucked out and captured each edge. 

    Regards

    Lori