2025-05-30 1:41 PM - edited 2025-05-30 1:52 PM
I want to interconnect STM32F407 microcontroller (on the STM32F4 Discovery board) with CS43L22 audio DAC from the same board and external TV tuner R820T but on the same I2C bus. The R820T works correct when RESET line of the CS43L22 is tied low. When I turned RESET line to high in my code and added initialization code for CS43L22 (including I2S) it works fine but R820T not. Here comes schematic diagram. The CS43L22 and obviously R820T are connected to I2C1 PB9 (SDA) and PB6 (SCL):
The A0 line is connected to ground so I2C address is 0x94 and it's correct. According to the R820T datasheet it has 0x34 address:
So what's the issue? I faced addresses conflict. I checked my code and hardware with oscilloscope and logic analyzer. It's also everything perfect except something extremely strange with CS43L22. It shouldn't be something like that but CS43L22 respond to both addresses 0x94 and 0x34. I disconnected my board with R820T from the Discover Board and it's really like that. I scanned I2C bus with simple code Link :
UART_printf("Scanning I2C bus:\r\n");
HAL_StatusTypeDef result;
uint8_t i;
for (i=1; i<128; i++)
{
//the HAL wants a left aligned i2c address
//&hi2c1 is the handle
//(uint16_t)(i<<1) is the i2c address left aligned
//retries 2
//timeout 2
result = HAL_I2C_IsDeviceReady(&hi2c1, (uint16_t)(i<<1), 2, 2);
if (result != HAL_OK) // HAL_ERROR or HAL_BUSY or HAL_TIMEOUT
{
UART_printf("."); // No ACK received at that address
}
if (result == HAL_OK)
{
UART_printf("0x%X", i); // Received an ACK at that address
}
}
UART_printf("\r\n");
Here comes the result with CS43L22 RESET line high:
So I have 0x1A and 0x4A. After left bit shift it's 0x34 and 0x94. Please remember R820T was disconnected. I tested it on the pure Discovery Board without additional hardware. The result with CS43L22 RESET line low:
I don't have any I2C devices and It's exactly as I expected. Here comes proper reading sequence of R820T from logic analyzer with CS43L22 RESET line low:
It's everything correct and no addresses conflict. The same experiment but with CS43L22 RESET line high:
As you can see I got all zeros because CS43L22 tied SDA line to ground. I have large SCL frequency because CS43L22 requires something like that (roughly 115 kHz or higher):
It's one of the most strange issue I've ever seen. The CS32L22 datasheet doesn't mention about it. I know that the only possible solution is connect R820T to another I2C bus and I can do that. Someone can test it on the same board? I mean only scan I2C addresses.
2025-06-18 9:44 AM
Your only choice if you don't want to modify the Discovery board, is to use an I2C translator to allow you to use a different I2C slave address
https://www.analog.com/media/en/technical-documentation/data-sheets/4316fa.pdf