Hello Team,
I am implementing I2C communication between STM32 and ADV7613 with HAL API's available in STM32CubeIDE, I am using target address 0x98 to access IO Map and want to read/write to IO map register address like 0x01 for Primary mode configuration, but I could not be able to establish an I2C communication. Below is the code snippet I have used:
#define ADV7613_IOMAP_ADDR 0x98<<1
uint16_t ADV7613_PRIM_MODE_ADDR = 0x01;
uint16_t ADV7613_PRIM_MODE_DATA = 0;
if(HAL_I2C_Master_Transmit(&hi2c1, (uint16_t)ADV7613_IOMAP_ADDR, &ADV7613_PRIM_MODE_ADDR, 1, 1000) == HAL_OK){
if(HAL_I2C_Master_Receive(&hi2c1, (uint16_t)ADV7613_IOMAP_ADDR, &ADV7613_PRIM_MODE_DATA, 1, 1000) == HAL_OK){
HAL_Delay(1000);
}
}
Kindly please help me, if I am accessing target address in a correct way and what are the correct steps I need to be follow to setup I2C communication.
Regards,
RupeshK