Porting application from BeagleBone Black to Pocket Beagle

Hi,

I have an IoT project which uses BeagleBone Black as the central computing device. I’m planning to move to Pocket Beagle (to save some $$).
I was using the following on BeagleBone Black

  1. I2C2_SCL (pin P9_19) and I2C2_SDA (pin P9_20). This maps to P1_28 and P1_26 on Pocket Beagle (not sure what mode this is on)
  2. SPI0 and SPI1 on BBB which maps to P1_6,8,10,12 and P2_25,27,29,31 on Pocket Beagle.
  3. UART4 on BBB which maps to P2_5 and P2_7 on Pocket Beagle
  4. I need an Ethernet Port, Wifi. I plan to add a USB Host A as described here https://groups.google.com/forum/#!category-topic/beagleboard/GOwSuY4oiyI and connect to it a USB hub which can integrate many USB adapters. Does anyone info on how many devices pocket beagle can support this way (from a current/power perspective)
  5. I was powering the BBB with 5V through pins P9_07 and P9_08. I’m a little confused on how I can do that with Pocket Beagle. https://groups.google.com/forum/?utm_source=digest&utm_medium=email/#!category-topic/beagleboard/pocketbeagle/8Y5COfcW-Ok talks about some power issues. Any input on how I can connect my 5V line to Pocket beagle?
    Any thoughts on move from BBB to Pocket Beagle? Any other caveats that people have found with Pocket Beagle? Stability issues? The software status page ‘WIP’ for most of the items.

This is a rather easy task, not sure why you need to ask. :wink:

Very very good question from the OP here. I too would like to know more about porting applications to the Pocket Beagle. In fact I am so interested I am inclined to give it a try myself. I have a couple BeagleBone Blue boards that I just got. Clearly, the BB Blue comes with resources not included on the PocketBeagle. What this question needs is a straightforward explanation of common resources found on BB Blue, BB Black, and the PocketBeagle for which a class of applications will run on all of these boards.

Just wondering the same thing. I would like to do my development on a larger BeagleBone, but aiming at the PocketBeagle as an ultimate (built-in) target. Is code written for one Beagle portable between others?

Sorry if this is a newb question, but I can’t seem to find an answer anywhere else.

Well, it sort of depends on what capabilities you are using.
The CPU is pretty much the same.
The available IO pins pretty much map to different places.
The PocketBeagle does not have Ethernet or Video output.
Some of the defaults are set up differently.
Since you did not mention what you were trying to do, or what capabilities you planned to use, the answer has to be “maybe.”

If you don’t need any of the missing capability, and you are ready to adjust for the differences in IO that is present, the answer is “probably.”

— Graham

It should be possible to move to the Pocketbeagle. I moved a moderately complex application from the black to the pocketbeagle. I use GPIO, both SPIs, I2C and USB. Here’s what I found (4.14-based beaglebone debian distro):

  1. SPI and I2C devices should be ok providing you are using the standard device files for access. I am using the SPI busses for a LCD and touchscreen. In that case since I am using a specific driver for each device I had to make new device tree files for the pocketbeagle to tell the drivers how to talk to the hardware. And I had to change /boot/uEnv.txt to include the new device tree files. I am using the PRUs so also had to make pocketbeagle-specific device tree files for the pins they used as well.

  2. Not sure about UART4 but if a device file shows up for it then I imagine it will work. The pocketbeagle seems to have a good default hardware configuration.

  3. The pocketbeagle has a different power distribution. Like the Black it’s still using the same PMIC but the external wiring is different. I encourage you to download and look at the schematic and read-up on the PMIC operation. On the PB, the USB power from the micro-USB connector is connected directly (through a ferrite inductor) to P1.7 with a fairly fat trace. If you power your hub from P1.7 then the number of devices will be based on the capability of the power supply you connect to the micro-USB connector (and the USB cable wiring, connector limits, etc). You could have an external 5V power supply that powers both the Pocketbeagle and USB Hub. It would connect to P1.7 (or, alternatively, VIN, on P1.1) and also the Hub input. However, if you power the pocketbeagle via VIN (P1.1) then you will see nothing coming out of P1.7. In that case you have to also connect the USB Hub power input directly to the supply.

  4. See above I was a little surprised that you powered the Black via P9.7/P9.8. It works I guess but I wouldn’t think this is good practice since you are connecting to the output of the PMIC (and back-feeding it). I think the Black with USB peripherals is intended to be powered with a high-current 5V supply through the barrel jack input since this is the high-current path through the PMIC.

Thank you guys! To answer Graham’s question, I will be using Machinekit/LinuxCNC to build a 8/9 axis modular CNC machine (flexible configuration, with luck).

A side note: Have you guys heard of/any experience with Balena (https://www.balena.io/docs/learn/getting-started/beaglebone-black/cpp/)? They seem to have some coverage for both BBB and PB:

https://github.com/balena-os/balena-beaglebone/blob/e5637ab3b5a6c8a3943b43428f3be43f4c270c3a/layers/meta-resin-beaglebone/conf/machine/beaglebone-pocket.conf