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