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.

CCS/CC3220SF-LAUNCHXL: when I use the CONFIG_UART_1,I can only send data,but can't receive any data in my readcallback.

Part Number: CC3220SF-LAUNCHXL
Other Parts Discussed in Thread: SYSCONFIG, CC3220SF,

Tool/software: Code Composer Studio

SDK:simplelink_cc32xx_sdk_4_10_00_07 CCS:Version: 10.0.0.00010 ;

CONFIG_UART1 _0,pin is p45 and -62,configerd by sysconfig; only can send ,but can't receive any data!

  • Hi,

    No this is not possible. Please see schematic for your LaunchPad. Pin P45 is not connected at CC3220SF LaunchPad and cannot be used.

    Jan

  • Hi Jan,

    At present, in CCS, UART can only be added through sysconfig. When UART is added, only P45 can be selected in sysconfig pinmux, and other options will conflict. What should I do if I want to add UART?

  • Hi Jan,

    Do you have cc3220sf-launchxl platform? You can help to confirm that the newly added UART cannot receive data.

    Zhao

  • Hi Jan,

    My board version is PCB Rev.c,WCS002C; The circuit diagram you provided is version A!

  • Hi Zhao,

    You cannot use P45 at CC3220SF LaunchPad from hardware reasons. There is nothing to check at software side. Please see schematic as mentioned above.

    If you can to use UART1, you can select RX on of this pins: P2, P8, P17, P45 (limited usage - see note 10 at CC3220SF datasheet), P57, P59 (hardware changes at LaunchPad redargued - see R109, R113, R111 and C56 at LP schematic).

    Jan

  • Hi Jan,

    Now,I use UART1,RX with P8;

    but I can't receive any data still!

    my code:

        UART_Params uartParams;

        UART_init();
        UART_Params_init(&uartParams);
        uartParams.readMode = UART_MODE_CALLBACK;
        uartParams.readCallback = NULL;
        uartParams.writeDataMode = UART_DATA_BINARY;
        uartParams.readDataMode = UART_DATA_BINARY;
        uartParams.readReturnMode = UART_RETURN_FULL;
        uartParams.readEcho = UART_ECHO_OFF;
        uartParams.baudRate = 115200;

        uartHandle = UART_open(CONFIG_UART_1, &uartParams);
        UART_control(uartHandle, UART_CMD_RXENABLE, NULL);
        /* remove uart receive from LPDS dependency */
        //UART_control(uartHandle, UART_CMD_RXDISABLE, NULL);

        while(true)
        {
            const char* str = "sending again\n";
            char readBuf [200] = {'\0'};
            UART_writePolling(uartHandle, str, strlen(str));

            sleep(1);

            int_fast32_t readbytes = UART_read(uartHandle,readBuf,200);
            if(readbytes > 0)
                UART_PRINT("receive data:%s\n\r",readBuf);
            else
                UART_PRINT("No data receive!!!\n\r");

            sleep(1);
        }

    UART1 Config:

  • Hi,

    Sorry, I am not able test your setup but according image above this cannot work because you have conflict at your SPI (likely P8 GSPI_CS).

    Jan

  • Hi Jan,

    Can you provide me with a complete configuration? And Rx can receive data.

    Because there are no examples to refer to in the current SDK.

    Thank you~

    Zhao

  • Hi Zhao,

    Sorry no. I don't have installed version of CCS which supports Sysconfig (I use version 8.3). But if SPI is not used at your code, you can remove this peripheral and after that test your UART code.

    Jan

  • Hi Jan,

    If I remove SPI,some errors will be appear!

    <Linking>
     
     undefined       first referenced                                                                                   
      symbol             in file                                                                                        
     ---------       ----------------                                                                                   
     SPI_Params_init C:/ti/simplelink_cc32xx_sdk_4_10_00_07/source/ti/drivers/net/wifi/ccs/rtos/simplelink.a<cc_pal.obj>
     SPI_close       C:/ti/simplelink_cc32xx_sdk_4_10_00_07/source/ti/drivers/net/wifi/ccs/rtos/simplelink.a<cc_pal.obj>
     SPI_open        C:/ti/simplelink_cc32xx_sdk_4_10_00_07/source/ti/drivers/net/wifi/ccs/rtos/simplelink.a<cc_pal.obj>
     SPI_transfer    C:/ti/simplelink_cc32xx_sdk_4_10_00_07/source/ti/drivers/net/wifi/ccs/rtos/simplelink.a<cc_pal.obj>

    If I remove sysconfig, how I can do ?

  • Hi Jan,

     The following configuration of SPI should not affect the function of Rx(P8)?

  • Hi,

    No. You cannot remove both SPI peripherals, just remove GSPI (SPI for application processor). Connection between application processor and NWP (network processor) is done via SPI. In case of removing this interface you will not be able use sl_ API calls via host driver.

    update: I don't think so that such setup of SPI can affect P8 RX UART pin.

    Jan

  • Hi Jan,

    If P45 is not connected, how can there be voltage? 3.3v!!!

    Is PCB Rev A and rev C different?

    I use Rev C.

    Zhao

  • Hi Zhao,

    Pin P45 cannot be used at CC32xxSF devices. Nice explanation you find here.

    I am not sure what is difference between Rev-A/Rev-B and Rev-C. I have CC3220SF LaunchPad Rev-A na Rev-B and none of them have 3.3V at P45 booster pack connector (row P2 pin 4). Do you measure voltage at CC3220SF QFN or booster pack connector?

    Jan

  • Hi Jan,

    I confirmed that 3.3V came from another UART TX pin.

    Because of the need of work, I will use UART;

    Under the current conditions, how can I disable sysconfig and use the previous manual mode to configure my board?

  • Hi,

    I am sorry a am not able provide you exact steps because I don't use Sysconfig. Maybe some information you find here.

    Sysconfig works by that way. At moment of compilation are created ti-drivers configuration files and this files are used during build process.

    Jan

  • Hi  Jan,

    Now ,I have remove GSPI,and the uart pinmux config is ok; but I still can't data! Can you help me?

  • Hi,

    Unfortunately without deeper debugging of your code I am not able help you with this. Can you try to check SDK demo uartecho reconfigured to UART1?

    btw ... you are using old SDK. Can you update to latest version (4_30_00_06). Just for a case...

    Jan

  • Hi Zhao,

    It looks like you have UART readmode configured in callback mode, but you do not provide a callback function. In callback mode, UART_read() is non-blocking, so you should see zero bytes returned from the API. The number of bytes will be returned to the callback function once the specified buffer is filled.

    For your code snippet, it looks like you should keep the default readMode = UART_MODE_BLOCKING.

    See the UART TI Drivers documentation in the SDK docs folder or the uartecho demo in the SDK examples/drivers folders.

    Best regards,

    Sarah

  • Hi Sarah,

     Thank you for your help,Now it's ok~

    Best regards,

    Zhao