Understanding BBAI64 hardware circuit diagrams and uP to header pinout

As I was going through trying to choose pins that made sense for their use, I found it better to start with SysConfig and find all the contiguous pins that mapped to a particular PRU. Note those pin numbers in Sysconfig, then go find those pin references in the BBAI64 hardware documentation so I could then align them to pins on the P8 or P9 headers.

Some pins were straight forward. But others seem to have 2 microcontroller pins tied to the same header pin. As well, a number of the pins are showing “directions” of flow.

So I started with PRU_ICSSG0 PRU1, and chose the lowest-numeral pin and correlated it to the package pin ID. In this case, it was PRG0_PRU1_GPO0 which correlated to pin ID AE29. Looking in the BBAI64 drawings, I see that AE29 seems to be joined with AJ25 and both go to header P8_31.

In my case, I need PRG0_PRU1_GPO0 (AE29) to be bi-directional, however the drawing shows it as an input, but shows AJ25 as bi-directional.

Right below, you can see AG21 and AD28, but in this case, AD28 is shown as an output while AG21 is a bi-directional. But again, it’s AD28 that I need because it correlates to PRG0_PRU1_GPO1.

So what’s the story with the direction arrows?

And why are pins grouped together on the same header pin? My only guess is this just to increase the chance that peripherals can be accessed on the headers but you’ll have to be careful not to activate both at the same time.

I believe you are correct, in that multiple pins are connected to the same header pin to allow for more options. I would not pay too much attention to the arrows on the schematic as the direction will depend on the pin muxing that is being configured.

Yes you will need to make sure that the pin muxing for paired pins is set correctly. The unused pin needs to be set to GPIO mode. If you have a look at one of the included files in the DTS files you will find some macros that do this, for some of the aux modes, but not all variations. You might need to add your own

Good to know.
I’m sure it is quite a challenge attempting to get cape cross-compatibility for different microcontrollers that each have different peripherals and resources along with often different muxing options. So it’s not surprising that tricks like this are required.

However this also leads me to another question related to these headers. Looking at the P9 header for the BBAI64, it appears longer than P8, but the pin count is the same. Looking a little closer, it appears counting of pins doesn’t start with the first pins. Is this another one of those attempts to keep backwards cape compatibility with previous platforms?

The top pins are a dedicated USB port, handy if you want to make a custom cape that requires a usb connection.