STM32F4 Cube v1.9.0 I2C Memory Interrupt Functions
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-12-11 1:46 PM
Posted on December 11, 2015 at 22:46
Hi,
I am working with the I2C HAL code (v1.9.0) and I am playing around with the HAL_I2C_Master_Transmit_IT(), HAL_I2C_MasterTxCpltCallback, HAL_I2C_Master_Receive_IT(), HAL_I2C_MasterRxCpltCallback, HAL_I2C_Mem_Write_IT(), HAL_I2C_MemTxCpltCallback, etc ...When I use the Master versions of the calls I see the callback functions get triggered, but I don't see the callbacks being triggered when I try to use the Memory versions of the calls. Would anyone have an idea of what I might have missed in the memory versions of the function calls? Why does the Master version work, and not the memory version. I think I am using the right callback functions for master and for memory.Thanks in advance for your help.Bob #i2c #hal
Labels:
- Labels:
-
I2C
-
STM32Cube MCU Packages
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2016-02-08 8:27 PM
Posted on February 09, 2016 at 05:27
Hi,
I too saw the same thing, not in CubeF4, but in CubeL0 v1.4.0. During a HAL_I2C_Mem_Write_IT() call, I2C_MemTxCpltCallback() never gets executed after the completion of the transfer, instead HAL_I2C_MasterTxCpltCallback() is the one called on both during I2C_Master calls or I2C_Mem calls. The mistake, i found, lies is in I2C_MasterTransmit_ISR() and I2C_MasterReceive_ISR() functions in the supplied stm32l0xx_hal_i2c.c file. This won't cause much problem in the behaviour of the project, but it deviates from the documentation. Hope it gets corrected in the future versions.