Skip to main content
Dave Jones
Associate III
April 16, 2018
Question

[Bug Report] CubeMX generated I2C init has flaw

  • April 16, 2018
  • 2 replies
  • 682 views
Posted on April 17, 2018 at 00:13

I don't know if there's a non-forum place to send CubeMX bug reports, so I'm putting it here.

I found this when generating a CubeMX project for the STM32L452 with the I2C ports created using LL code..

In the I2C initialization code, at the end of the MX_I2Cx_Init() function (where 'x' is the I2C port number) there is a line: LL_I2C_EnableClockStretching(I2Cx); (or presumably similar with 'disable' if that's your choice within CubeMX). The flaw is that, according to both the RM and the comments inside the code where that function is defined, the clock stretching bit can not be changed when the I2C port is enabled. But the init code enables the port several lines previous to changing that bit.

    This topic has been closed for replies.

    2 replies

    Khouloud GARSI
    ST Employee
    April 19, 2018
    Posted on April 19, 2018 at 17:45

    Hello

    Jones.Dave.002

    ,

    This is theright place to report any potential bug you see. We will take care to review it and fix it if needed.

    The point you have highlighted is now under review,we will come back to you with an update ASAP.

    Many thanks for your contribution to the enhancement of our STM32 resources.

    Khouloud.

    Nawres GHARBI
    ST Technical Moderator
    April 23, 2018
    Posted on April 23, 2018 at 16:08

    Hi Dave, 

    Thank for reporting this issue, it will be fixed next release