cancel
Showing results for 
Search instead for 
Did you mean: 

STM32, I2C HAL functions and RD5807M

dliky2
Associate II

Hi all,

I'm having a very hard time with the use of HAL_I2C functions to communicate with a FM digital chip. This IC has two modes of communication: (1) a sequential mode used to send several bytes successively in the registers and (2) random mode to adress a single register.

I'm totally lost on which HAL function to use depending on the access mode. Morever the HAL_I2C_MasterTransmit only allows the left-shifted IC address as an argument therefore where or how do I pass the first register address??? Or may be should I use the HAL_I2C_MemWrite function to send bytes one after another?

I'm working on this problem for days now. I originally thougt the cause was due to hardware problems but it doesn't seem to be the case (I even replaced the tuner IC).

The board I'm using is a STM32F429I-Disc1, the chip is on I2C3 running at 100kHz. The RDA5807M datasheet I use is version 1.8.

Your help will be deeply appreciated and any code sample/example will be welcome.

Thanks a lot.

1 REPLY 1
Piranha
Chief II

Just use HAL_I2C_Mem_Write***()/HAL_I2C_Mem_Read***() functions.