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.

CC2652P: How to use pins as multiply functions?

Part Number: CC2652P
Other Parts Discussed in Thread: SYSCONFIG

Hi, I use CC2652P, simplelink_cc13x2_26x2_sdk_4_40_04_04, CCS10.2.

I have a question about pin using.

In my application, I use two pins as uart tx and uart rx.

Under general condition, the uart works normal.

But under other condition, I need to config the two pins as input or output GPIO for a while, and after some time, config the two pins back to uart.

In a word, I need to switch pin function between one peripheral function (for example uart) and another peripheral function (for example GPIO).

I find it difficult to do such things, because in syscfg, if I set one pin in uart, I cannot set the same pin in GPIO.

So what should I do to make this kind of pin function switch?

Thank you very much.

  • I suppose you still can close the UART before you switch them to GPIO functionality and then reinitialize UART when you need to use it again.

  • Hi yingtao,

    Please follow YK's advice and see whether it addresses your application needs.  You can view syscfg/ti_drivers_config.c to further understand the TI Driver pin and peripheral configurations from SysConfig, and if necessary it should be possible to initialize these outside of the tool.  Please reference the TI Drivers Runtime APIs if you have not yet done so.

    Regards,
    Ryan

  • Thanks. 

    Let me give an example.

    If I use DIO12(pin 18) and DIO13(pin 19) as uart rx pin and uart tx pin, I can set the PinMux in syscfg as below,

    I can init_uart, open_uart and close_uart, these work fine.

    And also, I can not add DIO12 and DIO13 to GPIO in syscfg because of confilict as below

    Now, If I need to switch DIO12 and DIO13 to GPIO, I'd like to call GPIO_setConfig as below

    It is obviously that I can not call this API because of the first param.

    There is no GPIO index of DIO12 and DIO13 because in GPIO module of syscfg, I can not add DIO12 and DIO13.

    So, I just can not call this API.

    Need help. Thanks.

  • For DIO12 and 13 switching to GPIO dynamically, you cannot use syscfg to configure them. You have to setup and switch directly in your application code.