Using Robotics Cape with Beaglebone AI

Hi there

I was just wondering if anyone could discuss the steps for making the robotics cape work with BB-AI.

Thanks!

Hi

Just a quick update on what I was able to find and my current problems.

  1. You can read the IMU and Barometer simply by changing the bus to 3. The MPU has a nice configuration template where you select the i2c_bus. You can just do conf.i2c_bus=3, and it will run as normal. The barometer does not seem to have this, and instead you have to modify the bmp.c file.

  2. There seems to be a problem with the PRUs as my previous codes use them to read RC Receiver PPM signals, and generate PWM using mirkix PRU’s for ardupilot., are unable to even share memory with them, and running rc_test_drivers does indicate that the PRU did not load properly.

  3. I also have problems with the LEDs as they don’t seem to be loading properly in the rc_test_drivers.

  4. Regarding UART, they seem to have problem given they are all set as ttyS1, ttyS2, etc. Only ttyO5 is working, and is set as ttyO5 → ttyS5, which I am guessing is some kind of renaming or something? Not sure, not an expert on linux.

Any help would be much appreciated! :slight_smile:

This is on my backlog. I have done some hacking on it on some branches, but have a long way to go.

Hi @jkridner

Thank you for your prompt response.

As a quick update:

I have managed to get the PRU working for PWM generation on all 8 servo channels using Mirkix PRU codes for ardupilot which you can find in (ardupilot/RcAioPRUTest.c at BBAIPilot · juvinski/ardupilot · GitHub). For this you need to update both the “RcAioPRU_BBAI_bin.h” file that is used, as well as the RAM/CTRL/IRAM addresses which are used by the PRU program…

Nonetheless, the aforementioned PRU program is still unable to read/process my RC Receiver CPPM signals when connected to the E4 pin of robotics cape (as it was done in previous boards), and after some quite long discussion in (mirkix/BBBMINI - Gitter), I’ve now understood that the PRU program that they have is loaded to I think PRU-ICSS2 which apparently has the eCAP0 linked to pin P8_32 of the pin header… I am now trying to change that to load the PRU code on PRU-ICSS1 which supposedly has the eCAP0 linked to pin P8_15, as in the blue/black, etc. which is available in connector E4.

The alternative for me, which I’ve already implemented is to use a UART port to process iBUS from my Flysky RC Receiver.

I should mention that the problem of the UARTs set as ttyS1 instead of ttyO1 was gone when I updated the /boot/uEnv.txt file with dtb=am5729-beagleboneai-roboticscape.dtb.

This also fixed some other errors reported when I ran the “rc_test_drivers” of the robotics cape, such as UART, SPI, LED, ADC as seen in the image below.

image

Nonetheless, even though the LEDs drivers seem to have loaded, they still give me some errors when I test “rc_test_leds”. The good news is ADC seems to be working correctly. :smiley:

image

Something that caught my eye and I can’t quite understand why is happening or what it means is that I don’t have a
/sys/devices/platform/ocp/ folder…

image

Hi

Just a couple of comments on some further progress.

I am now able to fly my hexacopter perfectly as I did before with the Beaglebone Blue.

One of the things I noticed from the aforementioned Mirkix PRU code was that the Servo outputs are actually mapped as : 1 2 3 4 5 6 in BBBlue → 2 1 4 3 6 5 in BB_AI+Robotics Cape

Moreover, I noticed that UART5 from Robotics Cape is actually UART 1 in BB_AI, and I’ve successfully I used this to read an iBUS RC receiver.

Hope this helps anyone.

All the best!

1 Like