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.

TMS320F28069: HRCAP/USB: RISEOVF with USB

Part Number: TMS320F28069

Hello,

When the MCU is connected through USB (CDC), rise overflow occurs:

__interrupt void HRCAP1_Isr(void)
{
    EALLOW;

    if (HRCap1Regs.HCIFR.bit.RISEOVF == 1)
    {
        edgesMissed[CH1]++;
        HRCap1Regs.HCICLR.bit.RISEOVF = 1;
       //ESTOP0;         // Another rising edge detected before ISR serviced
    }

    if (first[CH1] < 1)
    {
        // Discard first data (because first interrupt after reset/clk enable
        // measures time from clock start to edge instead of valid pulse width)
        first[CH1]++;
    }

As soon as the USB is disconnected, there is no overflow anymore.

I tried using SYSCLK instead of PLL2CLK for HCCAPCLK (HCCAPCLKSEL=0), since USB and HRCAP seem to share the same clock but the problem remains.

If I retrieve the measured samples, they are noisy.

It works fine with UART though.

Best regards,

Marc