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.

[参考译文] CC2340R5-Q1:连接监控器与 UART 驱动程序冲突

Guru**** 2595805 points
Other Parts Discussed in Thread: CC2340R5, SYSCONFIG

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

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1343971/cc2340r5-q1-the-connection-monitor-conflicts-with-the-uart-driver

器件型号:CC2340R5-Q1
主题中讨论的其他器件:CC2340R5SysConfig

您好

我目前正在使用的 SDK 为 simplelink_lowpower_f3_SDK_7_40_00_64、工程为 CONNECTION_MONITOR_LP_EM_CC2340R5_freertos_ticlang。

我正在调试连接监视器、CC2340通过 UART 接收连接参数、然后开始扫描。

但我现在发现在连接监视器驱动程序中 RTLSBHost_openHostIf()也使用了 UART,这会导致冲突。

此 API 是否会影响整个过程? 我可以把它注释掉吗?

此致、

普雷斯顿

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

    您好

    当我继续读取代码时、我发现串行端口已初始化。

    在此之前、我添加了 uart2echo.c 来初始化串行端口、这会导致代码逻辑冲突

    void NPITLUART_openTransport(uint8_t portID, UART2_Params *portParams,
                                 npiCB_t npiCBack)
    {
        npiTransmitCB = npiCBack;
    
        // Initialize the UART driver
        UART2_Params_init(portParams);
        portParams->readMode = UART2_Mode_CALLBACK;
        portParams->writeMode = UART2_Mode_CALLBACK;
        // Add call backs UART parameters.
        portParams->readCallback = NPITLUART_readCallBack;
        portParams->writeCallback = NPITLUART_writeCallBack;
        portParams->baudRate = 460800;
    
        // Open / power on the UART.
        uartHandle = UART2_open(portID, portParams);
    
        // Clear ISR Buffer
        memset(isrRxBuf, 0, UART_ISR_BUF_SIZE);
    #if (NPI_FLOW_CTRL == 0)
        // This call will start repeated Uart Reads when Power Savings is disabled
        NPITLUART_readTransport();
    #endif // NPI_FLOW_CTRL = 0
    
    }
    

    但当前串行端口没有输出任何内容、如何禁用节电功能 以使串行端口重复读取?

    此致、

    普雷斯顿

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

    您好,普雷斯顿,

    若要禁用节能功能、可以在 SysConfig 中修改电源模块。 在 SysConfig 窗口的 TI 驱动程序下找到电源、并将 Policy 函数修改为 PowerCC23X0_doWFI、而不是 PowerCC23X0_StandbyPolicy。 这将禁止 MCU 进入待机模式、您应该能够重复调用读取。

    此致!
    阿赫尤特·雷