Tool/software:
We are using CC2640R2F Bluetooth Chipset with a ATECC608 which is a I2C security chip connected to I2C0 bus VIA IOID_4 and IOID_5.
The I2C driver work correctly with UART0 closed. But if I open the UART0 port, The I2C_transfer always return false and the I2C register DATAACK_N ADRACK_N ERR all set to 1. I connect a LA to the SDA and SCL, and found there is a Clock signal lost.
We are using simplelink_cc2640r2_sdk_5_30_01_11 SDK.
Below is configuration code:
if (bus >= 0 && bus < MAX_I2C_BUSES) { I2C_BitRate frequency; I2C_Params_init(&i2cParams); //change to baudrate if(cfg->atcai2c.baud == 1000000){ frequency = I2C_1000kHz; }else if(cfg->atcai2c.baud == 400000){ frequency = I2C_400kHz; }else{ frequency = I2C_100kHz; } i2cParams.bitRate = frequency; #if I2C_USING_CALLBACK_MODE i2cParams.transferCallbackFxn = hal_i2c_callback; i2cParams.transferMode = I2C_MODE_CALLBACK; #endif i2c = I2C_open(Board_I2C0, &i2cParams); phal->hal_data = NULL; //TODO: not use temporay return ATCA_SUCCESS; }
UART_Params uartParams; /* Create a UART with data processing off. */ UART_Params_init(&uartParams); uartParams.writeMode = UART_MODE_BLOCKING; uartParams.readMode = UART_MODE_BLOCKING; uartParams.readReturnMode = UART_RETURN_FULL; /*UART_RETURN_NEWLINE*/ uartParams.writeDataMode = UART_DATA_BINARY; uartParams.readDataMode = UART_DATA_BINARY; uartParams.baudRate = BaudRate; uartParams.dataLength = UART_LEN_8; uartParams.stopBits = UART_STOP_ONE; uartParams.parityType = UART_PAR_NONE; /* open Uart port */ uartHandler = UART_open(Board_UART0, &uartParams);
Below is some screenshot
Below is the normal I2C signal with UART disabled:
Regards