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;