P8_9 and P8_10 from the PRU?

63 views
Skip to first unread message

Jay Doobie

unread,
Dec 22, 2016, 10:25:12 PM12/22/16
to BeagleBoard
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

TJF

unread,
Dec 24, 2016, 10:04:05 AM12/24/16
to BeagleBoard
Hi Jay!


Am Freitag, 23. Dezember 2016 04:25:12 UTC+1 schrieb Jay Doobie:
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

Jay Doobie

unread,
Dec 24, 2016, 8:34:57 PM12/24/16
to BeagleBoard
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.

TJF

unread,
Dec 25, 2016, 2:34:15 PM12/25/16
to BeagleBoard


Am Sonntag, 25. Dezember 2016 02:34:57 UTC+1 schrieb Jay Doobie:
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

Jay Doobie

unread,
Dec 28, 2016, 2:54:37 PM12/28/16
to BeagleBoard
The libpruss code you posted seemed to use basic as a compiler.  Maybe I missed something on the link.

TJF

unread,
Dec 28, 2016, 3:06:33 PM12/28/16
to BeagleBoard


Am Mittwoch, 28. Dezember 2016 20:54:37 UTC+1 schrieb Jay Doobie:
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
Reply all
Reply to author
Forward
0 new messages