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.

[参考译文] TMS320F28386S:UART 错误

Guru**** 2535650 points
Other Parts Discussed in Thread: C2000WARE

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1104436/tms320f28386s-uart-error

器件型号:TMS320F28386S
主题中讨论的其他器件:C2000WARE

您好!

发生错误时应执行的操作

uint16_t rxStatus = SCI_getRxStatus (SCIA_BASE);

 if (rxStatus & SCI_RXSTATUS_ERROR){

建议

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

    Asaf、您好!

    错误可能是由多种原因引起的、通常在我们随 C2000Ware 提供的示例代码中、我们使用 Estop 停止代码、并指示用户检查系统中的特定错误。 根据错误、您可以分析代码/硬件并进行相应的调试。

            rxStatus = SCI_getRxStatus(SCIA_BASE);
            if((rxStatus & SCI_RXSTATUS_ERROR) != 0)
            {
                //
                //If Execution stops here there is some error
                //Analyze SCI_getRxStatus() API return value
                //
                ESTOP0;
            }

    谢谢、

    Aditya

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

    您好!

    通常有一个清除错误的明确函数、在我得到原因后、修复该错误的方法是什么?

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

    可以使用 API 清除错误标志-"SCI_performSoftwareReset"

    //*****************************************************************************
    //
    //! Performs a software reset of the SCI and Clears all reported receiver
    //! status flags.
    //!
    //! \param base is the base address of the SCI port.
    //!
    //! This function performs a software reset of the SCI port.  It affects the
    //! operating flags of the SCI, but it neither affects the configuration bits
    //! nor restores the reset values.
    //!
    //! \return None.
    //
    //*****************************************************************************
    static inline void
    SCI_performSoftwareReset(uint32_t base)
    {
        //
        // Check the arguments.
        //
        ASSERT(SCI_isBaseValid(base));
    
        //
        // To clear all errors a sw reset of the module is required
        //
        HWREGH(base + SCI_O_CTL1) &= ~SCI_CTL1_SWRESET;
        HWREGH(base + SCI_O_CTL1) |= SCI_CTL1_SWRESET;
    }
    

    有关 SCI Rx 寄存器错误标志的具体详细信息、您可以从器件的技术参考手册中查看 SCIRXST 寄存器。

    谢谢、
    Aditya

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

    您好!

    如果我使用此函数、它将停止什么转换?  

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

    抱歉、转换意味着什么会停止该函数? 请详细说明一下吗?

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

    您好!

    我同时发送和接收

    我想知道在调用函数 SCI_performSoftwareReset 时、传输是否会停止

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

    Asaf、

    软件复位只清除 SCI 标志。 它不会影响配置寄存器和 Tx 操作。