Struggling with I2C and the MCP79410 real time clock protocol
Hi,
I need to use the MCP79410 rtc (or alikes: DS1307, PCF8583, etc) but the STM32CubeIDE I2C seems that can't handle the read/write protocol for these devices.
For example, as the below image shows, one needs to send the control byte (writing) followed by the address byte and, without emitting the stop signal, but a start instead, to send the control byte again, but for reading, and finally the stop signal:

I'm using the HAL_I2C_Master_Receive() function:
ret_val = HAL_I2C_Master_Receive( &hi2c2, 0x6f<<1, mytime, 3, 1000 );
It's obvious that this function alone can't handle the rtc protocol and my question is: which STM32 I2C HAL function, or function combination, should I use to comply with such protocol? Any ideas or an example?
BTW, I2C is working because I can see both signals, SDA and SCL in the oscilloscope. The uC is STM32L073. It includes a RTC, but for the current application I need to use an external one (the project is power hungry, and this chip doesn't include a VBatt terminal so I'd need to create an intrincate power supplies scheme). Anyway, there must be a way to drive these rtc chips (I hope so).
Thank you in advanced!
