beagleboard / librobotcontrol

Robotics Focused library for embedded Linux computers. Mirror of https://git.beagleboard.org/beagleboard/librobotcontrol
https://beagleboard.org/librobotcontrol
MIT License
194 stars 154 forks source link

i2c2 driver not loaded #217

Open BucurCosmin opened 2 years ago

BucurCosmin commented 2 years ago

Using BBB with cape and Debian, the driver for I2C2 is not loaded (so MPU cannot be accessed). Tried all the latest Debian images. using librobotcontrol 1.0.5, 4.19.94-ti-r42

All other drivers are working fine. I was trying to enable I2C2 from device tree but no succes. In am335x-boneblack.dts it shows I2C2 as "disabled". After installing librobotcontrol pru-rproc is not loaded, everything else is loaded and working (even I2C2). After sudo dpkg-reconfigure librobotcontrol pru everything else except I2C2 is loaded.

BucurCosmin commented 2 years ago

I made again some test to replicate the issue:

  1. installing new image Buster 10.3
  2. apt-update & apt-upgrade, and the drivers are working (all except Led driver) BUT rc_test_motors and rc_test_servos are not working, meaning that the motors are not spinning.
  3. after sudo configure_robotics_dt.sh all the drivers are working except I2C2 and the motors are spinning.

What should I do to activate the I2C2 since actually the I2C2 is disabled in Beaglebone Black?

kambic commented 2 years ago

same issue at me

BucurCosmin commented 2 years ago

I can say that I've gone back to Debian 9.9 and librobotcontrol 1.0.4 as is working as expected.

apper002 commented 2 years ago

Same issue here....

apper002 commented 2 years ago

fixed with 10.3 install, then update and upgrade librobotcontrol, then update_kernel to 4.19.74

BucurCosmin commented 2 years ago

Hi apper, are you sayning that kernel version 4.19.74 is ok? I was trying the same, but update kernel shows 4.19.94-ti-r42 and i2C2 is not working

apper002 commented 2 years ago

debian@beaglebone:~$ uname -a Linux beaglebone 4.19.94-ti-r72 #1buster SMP PREEMPT Tue Mar 8 22:13:06 UTC 2022 armv7l GNU/Linux debian@beaglebone:~$ rc_test_drivers

Kernel: 4.19.94-ti-r72 BeagleBoard.org Debian Buster IoT Image 2020-04-06 Debian: 10.12

PASSED: gpio 0 PASSED: gpio 1 PASSED: gpio 2 PASSED: gpio 3 PASSED: pwm0 PASSED: pwm1 PASSED: pwm2 PASSED: eqep0 PASSED: eqep1 PASSED: eqep2 PASSED: pru-rproc PASSED: uart1 PASSED: uart2 PASSED: uart4 PASSED: uart5 PASSED: i2c1 PASSED: i2c2 PASSED: spi PASSED: LED PASSED: ADC iio

Currently running on a: MODEL_BB_BLACK_RC Robot Control library Version: 1.0.5

apper002 commented 2 years ago

debian@beaglebone:~$ rc_test_dmp -r 4 -m -b -c -a -g -T -t Raw Compass |FilteredComp| FusedTaitBryan(deg) | Accel XYZ (m/s^2) | Gyro XYZ (deg/s) | Temp(C)| 3.8 | 6.3 | 1.4 0.7 6.3 | -0.27 0.38 9.90 | -0.1 -0.2 0.1 | 29.40 |

BucurCosmin commented 2 years ago

debian@beaglebone:~$ uname -a Linux beaglebone 4.19.94-ti-r72 #1buster SMP PREEMPT Tue Mar 8 22:13:06 UTC 2022 armv7l GNU/Linux debian@beaglebone:~$ rc_test_drivers

Kernel: 4.19.94-ti-r72 BeagleBoard.org Debian Buster IoT Image 2020-04-06 Debian: 10.12

PASSED: gpio 0 PASSED: gpio 1 PASSED: gpio 2 PASSED: gpio 3 PASSED: pwm0 PASSED: pwm1 PASSED: pwm2 PASSED: eqep0 PASSED: eqep1 PASSED: eqep2 PASSED: pru-rproc PASSED: uart1 PASSED: uart2 PASSED: uart4 PASSED: uart5 PASSED: i2c1 PASSED: i2c2 PASSED: spi PASSED: LED PASSED: ADC iio

Currently running on a: MODEL_BB_BLACK_RC Robot Control library Version: 1.0.5

Excellent, seen the release r72 which can be an explanation. I will try it tomorrow (after I will clone the sd card)

BucurCosmin commented 2 years ago

Are you using the dmp with confidence? In version 1.0.4 I'm seeing drifts in euler angles. I this fixed in 1.0.5

apper002 commented 2 years ago

Can tell when i fixed other problems, trying to get arducopter-heli too work...