Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copter: 3.6 RangeFinder_VL53L0X stop working could be related to I2C scheduler !! #8159

Closed
shaddow501 opened this issue Apr 13, 2018 · 3 comments
Labels

Comments

@shaddow501
Copy link

shaddow501 commented Apr 13, 2018

Hello

I have encountered an issue when the RangeFinder VL53L0X is connected together with Toshiba LED.

it seems that when the Toshiba LEDis connected the VL53L0X hangs / freezes and stop working.

From my investigation it is not a hardware issue but a software issue.

Things I did to investigate:
First we know that the AP_Notify Toshiba_LED_I2C is looking for "ack" from the 0x55 address to find out if the LED is exist.

  1. I powered on the PixRacer without the Toshiba LED while the GPS and VL53L0X was connected and it ran without any failures for couple of hours.
  2. Powered on the PixRacer with the Toshiba LED + GPS + VL53L0X and the VL53L0X stopped working after a few minutes (more or less 10 min it worked till it stop getting data - seen by "sensorrange" in "Mission planner"

Then I thought that It might be a hardware issue, And to verify if it is hardware or code issue I turned on the PixRacer with the Toshiba LED waited till it recognized it (by flashing the LEDs) and then disconnected it, this was to emulate that the code will continue to send I2C data to the Toshiba LED.

The VL53L0X stopped working a few minutes later!

So I am now sure that something with the Toshiba LED driver/code cause interference with the VL53L0X.

UPDATE:
Where can I find how I2C schedule the commands since it seems to me that it doesnt wait till the line is free since every sensor has = dev->register_periodic_callback(20000/33000/50000 FUNCTOR_BIND_MEMBER
And sometimes it causes that sensors stop working if they fall into schedule of something else...
When I add 2 sensors that has 50000 scheduling it seems that one of them fall and wont recover.

I have noticed that issue when setting the VL53L0X instead of the 33000 (33ms) to 50000 (50 ms) and at this point the MaxsonarI2C that worked before for couple of hours without any issues stated failing, didnt give measurements anymore.
I have noticed that the MaxsonarI2C also have the 50000 (50ms) timing...
When I changed the VL53L0X timing to about 70000 (70ms) the MaxsonarI2C again worked without any issue.
I have changed the VL53L0X timing since the toshiba led runs at 20000 (20 ms) timing and that cause the VL53L0X to stop working after a few min...

@shaddow501 shaddow501 changed the title RangeFinder_VL53L0X stop working RangeFinder_VL53L0X stop working could be related to I2C scheduler !! Apr 16, 2018
@shaddow501 shaddow501 changed the title RangeFinder_VL53L0X stop working could be related to I2C scheduler !! Ardupilot - 3.6 - RangeFinder_VL53L0X stop working could be related to I2C scheduler !! Apr 16, 2018
@rmackay9 rmackay9 changed the title Ardupilot - 3.6 - RangeFinder_VL53L0X stop working could be related to I2C scheduler !! Copter: 3.6 RangeFinder_VL53L0X stop working could be related to I2C scheduler !! Apr 26, 2018
@rmackay9
Copy link
Contributor

I've added a wiki to-do issue to improve the wiki page for this lidar: ArduPilot/ardupilot_wiki#1216

@auturgy
Copy link
Contributor

auturgy commented Jul 30, 2018

Does #9024 fix this?

@rmackay9
Copy link
Contributor

@auturgy, yes definitely. Let's close this issue and we can re-open if we find the next release candidate still doesn't work. The next release candidate will be released tomorrow or the day after and should be called Copter-3.6.0-rc7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants