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: CC3220SF Port MUX Encoding

Part Number: CC3220SF
Other Parts Discussed in Thread: SYSCONFIG

Tool/software: Code Composer Studio

Hi,

At default, for I2C Port --> I2C_SCL (Pin-1);  I2C_SDA (Pin-2). But I want to use this Interface on I2C_SCL (Pin-3);  I2C_SDA (Pin-4). So, how I could map Pin (1,2) to Pin(3,4) at CCS? 

Also, similar question is for UART1. For UART1 Port --> UART1_TX (Pin-1);  UART1_RX (Pin-2). But I want to use this Interface on UART1_TX (Pin-7);  UART1_RX (Pin-8). So, how I could map Pin (1,2) to Pin(7,8) at CCS?

How I can do these mapping function? Can you inform me with a short code block if possible?

I use LAUNCHXL Board at tests. So, inside "CC3220SF_LAUNCHXL.c" lib, will we change below Green marked Pin definitions?

/*
* =============================== I2C ===============================
*/
#include <ti/drivers/I2C.h>
#include <ti/drivers/i2c/I2CCC32XX.h>

I2CCC32XX_Object i2cCC3220SObjects[CC3220SF_LAUNCHXL_I2CCOUNT];

const I2CCC32XX_HWAttrsV1 i2cCC3220SHWAttrs[CC3220SF_LAUNCHXL_I2CCOUNT] = {
{
.baseAddr = I2CA0_BASE,
.intNum = INT_I2CA0,
.intPriority = (~0),
.clkPin = I2CCC32XX_PIN_01_I2C_SCL,
.dataPin = I2CCC32XX_PIN_02_I2C_SDA
}
};

const I2C_Config I2C_config[CC3220SF_LAUNCHXL_I2CCOUNT] = {
{
.fxnTablePtr = &I2CCC32XX_fxnTable,
.object = &i2cCC3220SObjects[CC3220SF_LAUNCHXL_I2C0],
.hwAttrs = &i2cCC3220SHWAttrs[CC3220SF_LAUNCHXL_I2C0]
}
};

const uint_least8_t I2C_count = CC3220SF_LAUNCHXL_I2CCOUNT;

  • Hi Kemal,

    Please refer to the I2CCC32XX.h file in the SDK. In there are the defines for the pins you're looking for. Similarly for UARTCC32XX.h.

    Also if you update to the latest CC32XX SDK and CCS v10.0 you have access to Sysconfig which is a tool built into each example that allows you to configure pins graphically. If updating is not an option you can use pinmux tool instead (link below). 

    https://dev.ti.com/sysconfig/?fromPinmux=true#/start

    This GUI also allows you to configure all pins and generate the LAUNCHXL files for you. You will have to replace the files in your project with the ones it generates and this only works for older SDKs as LAUNCHXL files do not exist in the new ones. 

    Jesu