Tool/software:
Hello TI team,
I have attached the I2C scan device code that will scan the devices which are connected on the I2C channel. But if I write the data on the same channel it doesn't work
Thank you,
// To find the device address // void I2C_ScanBus() { char msg[64]; uint8_t devicesFound = 0; for (uint8_t address = 1; address < 127; address++) { HAL_GPIO_WritePin(MCU_BMS_RESET_GPIO_Port, MCU_BMS_RESET_Pin, GPIO_PIN_SET); HAL_Delay(100); HAL_GPIO_WritePin(MCU_BMS_RESET_GPIO_Port, MCU_BMS_RESET_Pin, GPIO_PIN_RESET); HAL_Delay(100); if (HAL_I2C_IsDeviceReady(&hi2c3, address << 1, 3, 10) == HAL_OK) { snprintf(msg, sizeof(msg), "Found I2C device at 0x%02X\r\n", address << 1); RS485_Transmit((uint8_t*)msg, strlen(msg)); devicesFound++; } } if (devicesFound == 0) { RS485_Transmit((uint8_t*)"No I2C devices found\r\n", 23); } }