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:带 USB 的 RISEOVF

Guru**** 2538960 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1186412/tms320f28069-hrcap-usb-riseovf-with-usb

器件型号:TMS320F28069

您好!

当 MCU 通过 USB (CDC)连接时、会发生上升溢出:

__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]++;
    }

一旦 USB 断开连接、就不再出现溢出。

由于 USB 和 HRCAP 似乎共享相同的时钟、我尝试使用 SYSCLK 而不是 PLL2CLK 作为 HCAPCLK (HCAPCLKSEL=0)、但问题仍然存在。

如果我检索测量的样本、它们会产生噪声。

不过、它可以与 UART 配合使用。

此致、

Marc

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Marc:

    请允许我查看此内容并与另一位专家核实。

    最棒的

    Ryan Ma

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Marc:

    您能否与 USB/HRCAP 共享您的 CCS 项目、以便我也可以在我的末尾验证发生了什么? 如果可能、您可以将邮件发送给我。