2020-06-28 01:13 AM
I wish to configure my STM32 MCU (STM32G071RB) as an I2C slave device, and support I2C burst-write and I2C burst-read, in a similar manner to many I2C slave devices:
(usually the RA value is incremented after every DATA byte)
The I2C receive/transmit functions that are available in the file "stm32g0xx_hal_i2c.c" all require a predetermined buffer size.
Is there a different I2C driver available for supporting burst write/read?
If not, how would you recommend to implement this on the MCU?
Solved! Go to Solution.
2020-06-28 09:13 PM
Solved.
Took me a while to figure it out, but I think I managed to rewrite the "stm32g0xx_hal_i2c.c" file to support the burst functions.
2020-06-28 09:13 PM
Solved.
Took me a while to figure it out, but I think I managed to rewrite the "stm32g0xx_hal_i2c.c" file to support the burst functions.
2022-06-09 08:35 AM
I have the same problem with a stm32 nucleo and an bosch accelerometer. I need to do a burst write in a register but i can't do it with the HAL_I2C_Mem_Write function. Can you give me some information about your solution ?
2022-06-11 10:11 PM
Hi JDaup.1,
It doesn't sound like the same problem.
Is your Nucleo configured as an I2C slave device?
Best regards,
Yiftah
2022-06-13 12:46 AM
Hi Yiftah
Thank you for your answer. In fact this is not exactly the same problem because my nucleo is the master and the accelerometer is the slave. I need to do a burst write in an accelerometer register in order to configure some features. How do you manage to do a burst write just by re-write some HAL functions ?
Best regards.
2023-06-29 10:03 PM
Hi JDaup.1,
I am currently experiencing a similar problem. Have you managed to discover a solution for it?