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: The connection monitor conflicts with the UART driver

Part Number: CC2340R5-Q1
Other Parts Discussed in Thread: CC2340R5, SYSCONFIG

Hi

The SDK I am currently using is simplelink_lowpower_f3_sdk_7_40_00_64, and the project is connection_monitor_LP_EM_CC2340R5_freertos_ticlang.

I am debugging the connection monitor, the cc2340 receives connection parameters by UART and starts scanning.

But I now find that RTLSHost_openHostIf() in the connection monitor driver also uses UART,this will cause conflict.

Will this api affect the overall process? Can I comment it out?

Best Regards,

Preston

  • Hi

    As I continue to read the code, I find that the serial port has been initialized.

    Before that, I added uart2echo.c to initialize the serial port, which caused a code logic conflict

    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
    
    }
    

    But currently the serial port is not output anything, how do I disable Power Savings to make the serial port read repeatedly?

    Best Regards,

    Preston

  • Greetings Preston,

    To disable power saving, you can modify your Power module in SysConfig. Find Power under TI Drivers in the SysConfig window, and modify the Policy Function to be PowerCC23X0_doWFI instead of PowerCC23X0_standbyPolicy. This will disable the MCU from entering standby, and you should be able to call the read repeatedly.

    Best,
    Achyut Ray