HAL for I2C is horribly broken
Hi STM Community,
I would like an answer from STM about the status of I2C in the HAL drivers.
Basically, they are broken, and still broken in STM32CubeIDE-1.7.0.
Of the many issues, there is still an open one here: https://github.com/STMicroelectronics/stm32l0xx_hal_driver/issues/5 and in fact even the examples provided don't actually work either (due to these issues with the _IT and _DMA functions).
For instance:
- HAL_I2C_Slave_Receive_IT and HAL_I2C_Slave_Receive_DMA never call HAL_I2C_SlaveRxCpltCallback or any other callbacks for that matter (I've tested this exhaustively), ever, making them unusable in practise. This desperately needs to be fixed.
- Confusingly HAL_I2C_Master_Transmit_IT and HAL_I2C_Master_Transmit_DMA DO work, and DO call HAL_I2C_MasterTxCpltCallback.
Is there an actual effort on STM's behalf to fix these functions, and actually test their OWN API's with hardware?
If so, is there a time-frame for these glaring issues to be fixed?
Has anyone ACTUALLY been able to get these simple functions working?
Also, is there any ACTUAL documentation for the usages of:
- HAL_I2C_Mem_Write
- HAL_I2C_Mem_Read
- HAL_I2C_Master_Seq_Transmit_*
- HAL_I2C_Master_Seq_Receive_*
Since the provided documentation is woefully inadequate, and there are zero examples provided with the Example folders on how to use these in context (which probably means they are broken, like a lot of HAL is).
It'd just be good to know what the plans are from STM themselves, since at this point I don't want to have to write my own drivers, because that's a huge undertaking, and these things should "just work".
Also, are STM open to collaborations on fixing HAL? If so how do we do that?
Regards,
etheory.
