Skip to main content
AElgh
Associate III
April 25, 2023
Solved

X-CUBE-TOF1 I2C issue with the STM32WL

  • April 25, 2023
  • 2 replies
  • 1577 views

Hello, I noticed that using the X-CUBE-TOF Package with the STM32WL55JC Nucleo-Board has an issue with the I2C-Peripheral(I2C-2).


_legacyfs_online_stmicro_images_0693W00000binJDQAY.png 

This genrates the I2C code in the IDE.


_legacyfs_online_stmicro_images_0693W00000binK1QAI.png 

And the Sensor can be derived.

while if I define the Sensor bus IO:


_legacyfs_online_stmicro_images_0693W00000bin7hQAA.pngThe Generated code is without the I2C


_legacyfs_online_stmicro_images_0693W00000binKzQAI.png 

And the Sensor is not discovered.

Is that normal? should I define something to make the I2C code get generated or this is a bug in the CUBEMX-Package for ToF?

Thank you

Amir

This topic has been closed for replies.
Best answer by STTwo-32

Hello again @AElgh 

After a deep check, we find out that when you define I2C2 or any other I2C to be used in the X-Cube-TOF, the I2C code will be generated inside the stm32wlxx_nucleo_bus.c file . And if not, the I2C code get generated in the main.c file.

Best Regards.

STTwo-32

2 replies

IIRHO.1
ST Employee
April 26, 2023

Hello @AElgh​ and welcome to ST Community.

I reproduced your problem and I had the same issue .

I will report the problem internally to the appropriate team to be treated .

thanks again for your question.

Issam

STTwo-32
STTwo-32Best answer
Technical Moderator
January 11, 2024

Hello again @AElgh 

After a deep check, we find out that when you define I2C2 or any other I2C to be used in the X-Cube-TOF, the I2C code will be generated inside the stm32wlxx_nucleo_bus.c file . And if not, the I2C code get generated in the main.c file.

Best Regards.

STTwo-32