Compile Error in MCUXpresso SDK v2.13.0, v2.14.0 and v2.15.0 fsl_flexio_i2c_master.c

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Compile Error in MCUXpresso SDK v2.13.0, v2.14.0 and v2.15.0 fsl_flexio_i2c_master.c

2,614件の閲覧回数
sachin_patel
Contributor III

EDIT 17/01/2024: Adding that v2.15.0 still fails compilation. Bug was reported shortly after the v2.14.0 release.

 

Hi,

I am compiling all device driver files into a static library, but one file is failing compilation "fsl_flexio_i2c_master.c"

The following functions are broken if "I2C_RETRY_TIMES" is defined. We define this to prevent getting stuck in an infinite loop.

 

 

 

static bool FLEXIO_I2C_MasterTransferStateMachineSendCommand(FLEXIO_I2C_Type *base,
                                                             flexio_i2c_master_handle_t *handle,
                                                             uint32_t statusFlags)

static bool FLEXIO_I2C_MasterTransferStateMachineSendData(FLEXIO_I2C_Type *base,
                                                          flexio_i2c_master_handle_t *handle,
                                                          uint32_t statusFlags)

static bool FLEXIO_I2C_MasterTransferStateMachineReceiveDataBegin(FLEXIO_I2C_Type *base,
                                                                  flexio_i2c_master_handle_t *handle,
                                                                  uint32_t statusFlags)

static status_t FLEXIO_I2C_MasterTransferStateMachineReceiveData(FLEXIO_I2C_Type *base,
                                                                 flexio_i2c_master_handle_t *handle,
                                                                 uint32_t statusFlags)

 

 

To fix, within each block, please initialise the `waitTimes` variable as follows:

 

 

#if I2C_RETRY_TIMES
                uint32_t waitTimes = I2C_RETRY_TIMES;
                ...

 

 

ラベル(1)
9 返答(返信)

765件の閲覧回数
sachin_patel
Contributor III

To NXP support,

I have also seen that a duplicate post has been made about this bug using a different MCU, see SDK-v2-15-0-for-RT1050-Defining-I2C-RETRY-TIMES-causes-compile/m-p/1832343/highlight/false#M4673 .

Can someone please look into this issue?

Thanks,

Sachin Patel

0 件の賞賛
返信

1,653件の閲覧回数
sachin_patel
Contributor III

Hi,

Can someone from NXP please report this bug so it can be triaged as it has been in the SDK for 3 releases now and is blocking us from upgrading to the latest SDK releases.

Thanks,

Sachin Patel

0 件の賞賛
返信

769件の閲覧回数
sachin_patel
Contributor III

Hi,

This issue is still present in SDK v2.16 for this chip. When can this issue be triaged?

Thanks,

Sachin Patel

0 件の賞賛
返信

2,480件の閲覧回数
RaRo
NXP TechSupport
NXP TechSupport

Hello @sachin_patel,

Thanks for sharing your workaround. You might also fix this using waitTimes as a global variable instead of writing it as local to each one of the functions:

#if I2C_RETRY_TIMES
    uint32_t waitTimes = I2C_RETRY_TIMES;
#endif

We are letting the team in charge to know about this. Just for double check, could you please tell us which MCU's SDK are you using? We found this issue in K32L2A41xxxxA's SDK v2.14.0 and v2.13.0, did you find this issue in another SDK?

Best regards, Raul.

1,723件の閲覧回数
sachin_patel
Contributor III

Hi @RaRo ,

This bug was not fixed in the v2.15.0 release of the SDK that was shipped a few days ago. Do you have a timeline on when this bug will get resolved?

Thanks,

Sachin Patel

0 件の賞賛
返信

2,423件の閲覧回数
sachin_patel
Contributor III

Hi @RaRo,

Thank you for the quick response.

I am using the K32L2A31xxxxA SDK which might be the same as the K32L2A41xxxxA SDK. I was upgrading from v2.12.0 to v2.14.0 (we skipped v2.13.0) so I was unaware it was in the previous release.

By the way, I think defining waitTimes as a global variable will be problematic as it should be reset at the beginning of each function. Please use the fix as I provided below.

Thanks,

Sachin Patel

0 件の賞賛
返信

2,382件の閲覧回数
RaRo
NXP TechSupport
NXP TechSupport

Hello @sachin_patel,

Thanks for your response. We are reporting this situation to the team in charge with your workaround.

Once again, thanks for sharing your feedback.

Best regards, Raul.

0 件の賞賛
返信

2,587件の閲覧回数
jst28
Contributor I

I am also facing the same issue compiling the latest SDK 2.14.0

2,571件の閲覧回数
sachin_patel
Contributor III

That's interesting, was this on the same file?

Which MCU are you using?