P8_9 and P8_10 from the PRU?

Is there an easy way to access to P8_9 and P8_10 from the PRU? I haven’t found much code on how one can access the GPIO’s, I assume the DTO needs to set the mode to 7 (GPIO[5] and GPIO[4])?

Thanks
J

Hi Jay!

Is there an easy way to access to P8_9 and P8_10 from the PRU? I haven’t found much code on how one can access the GPIO’s, I assume the DTO needs to set the mode to 7 (GPIO[5] and GPIO[4])?

Find example code in the libpruio project.

The CPU balls should be in mode 7 after boot / reset, allready → no DTBO necessary. Check it by executing analyse example, here I get

`
Header Pins:

P8_09, GPIO 2/05: input, pullup
P8_10, GPIO 2/04: input, pullup

`

For IO, set or read in GPIO-2 subsystem bits 5 (P8_09) and 4 (P8_10).

Note: the subsystem GPIO-2 is disabled by default:

`

GPIO-2 (DeAd: 00000000, ClAd: 00000000, ClVa: 00000000)
REVISION: 00000000
→ subsystem not handled (is down)

`

Regards

Thanks, is there a way to do it in ASM rather than basic? My entire code base so far is in ASM and I don’t really want to recode it.

What do you mean? All the PRU code is in ASM (pasm style).

Regards

The libpruss code you posted seemed to use basic as a compiler. Maybe I missed something on the link.

I’m refering to libpruio. It contains an API part, written in FreeBASIC. And there is a PRU part. I’m talking about that PRU part, written in PASM assembler.

Regards