cancel
Showing results for 
Search instead for 
Did you mean: 

Is this a bug in the HAL library about smbus?

one V
Associate III

0690X000006DcShQAK.png

0690X000006DcV7QAK.png

0690X000006DcYfQAK.png

0690X000006DcYkQAK.png

13 REPLIES 13
Imen.D
ST Employee

Hello,

Which CubeMx and Cube package versions used ?

I cannot reproduce this issue. Can you please share your ioc file for check.

Kind Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Imen.D
ST Employee

Hi,

After more check, I confirm that the problem exists for hdmarx and hdmatx with I2C4.

I transfer this issue to developer team for fix.

Thanks for your contribution.

Thanks,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

0690X000006DclyQAC.png

0690X000006Dcm3QAC.png

By the way, i2c4 can read external device data, but the i2c+BMDA method does not work. How to solve it?

Hi @one V​ 

Thanks for the feedback.

It will be corrected in the next STM32CubeMX version .

Regards,

Nesrine

So, the code generated by STM32CUBEMX(5.0.1) in I2C4+BDMA mode is not working now?

​Hi @one V​ 

DMA requests should not be used when I2C mode is set to one of the SMBUS modes.

That will be corrected in the next STM32CubeMX version.

Regards,

Nesrine

Thank you for your reply.

However, I2C mode does not seem to work, can you test it?

0690X000006DfSzQAK.png

0690X000006DfT4QAK.png

Hi @one V​ 

In STM32Cube_FW_H7_V1.3.2\Drivers\STM32H7xx_HAL_Driver\Inc path.

In the typedef struct __I2C_HandleTypeDef of stm32h7xx_hal_i2c.h file, you will find :

DMA_HandleTypeDef      *hdmatx;    

DMA_HandleTypeDef      *hdmarx;     

but it isn't available in stm32h7xx_hal_smbus.h

So, when I2C mode is set to one of the SMBUS modes as shown in this figure:

0690X000006Dg9UQAS.png

The DMA Tab must be removed when I2C is set to SMBUS mode .

==> This problem only exists for I2C4.

This bug will be fixed in the next STM32CubeMX version ( STM32CubeMX 5.1: That will be available Week 9 ).

Regards,

Nesrine.