‎2021-12-18 10:21 AM
Hello, Im not a good English speaker so please understand my English grammer.
Im here to ask about combining X-CUBE TOF and MEMS simple application.
I will be so happy if you help me :)
​
What enviroment Im working
STM32CubeIDE(1.7.0) didnt upgrade because 1.8.0 have issue on my mac.(when I generate code more than one time in ioc file, code conflict on build)
macOS Monterey(12.0.1)
X-CUBE-MEMS1(9.1.0)
X-CUBE-TOF1(2.0.0)
Nucleo WB55RG (ST-LINK FW : V2J39M27, BL Version : 0xd5, is this right?)
VL53L3CX breakout boards (Quantity : 8, Bus : I2C1)
Adafruit LSM6DSO32 (Bus : I2C3)
Adafruit LIS3MDL (Bus : I2C3)
​
What I did (All worked good)
1.communicated with single range sensor, used VL53L3CX_SimpleRanging in X-CUBE Software Packs (used user manual)
2.communicated with 8 range sensors, modified single range sensor application
3.communicated with Adafruit LSM6DSO32, LIS3MDL, used CUSTOM_DataLogFusion in X-CUBE Software Packs (used user manual)
BUT when I merge 2 and 3 to single project, TOF and MEMS sensors cant function.
I splitted I2C bus, one is for TOF, and other is for MEMS. I know all can be in a single bus. but when I tested sensors in a single bus, It didnt work. so I tested splitting I2C bus and V3.3.
Should I have to know about CRC or RTC functions? is this functions are conflicting with TOF sensors?
or
Should I have to know about TIM2 global Interrupt?
What should I have to know?
‎2022-02-04 02:32 AM
Hi @KHwan.2​ , that looks an interesting project. There are some examples in firmware function pack FP-SNS-MOTENVWB1 by ST that implements sensor interface with STM32WB: you might start from this, adding the libraries for the Time of Flight sensors.
AG
‎2022-02-05 12:26 AM
I think I'm not suffering from software that adding the libraries ToF and MEMS. I'm stuck at hardware connection between laser sensors.
‎2022-02-07 12:45 PM
Could your problem be that all the VL53's are at the same address? To change the address, there is a I2C command, but in order to use it, all the other sensors have to be shutdown. Once issued the current sensor will only respond to the new address - so you can bring up the next one and change it's address.
You said you communicated with 8 sensors, so you might already be past this.
‎2022-02-10 07:24 PM
I shut downed all sensors and,
woke up one by one
and changed address.
When I do with 2 or 3 VL53 sensors, It works and it proves I changed address correctly.
but since I do with 4 ~ 8 sensors, this not work.
‎2022-02-11 07:42 AM
I've been working with the I2C bus for 30 years and in a word it's "awful". It's error prone, it requires an insane amount of tweaking and it's unreliable. But it is cheap. And you cannot beat cheap.
So get your scope out and you will see what is happening. As you add more devices to the bus the capacitance changes and you need to adjust the pull-ups.
And don't forget the wire lengths. That matters too.
Philips invented the bus and NXP bought Philips. So go to NXP and look up how to tune your I2C bus. There is a formula there, but it basically says, more devices on the bus, bigger pull-ups.