How to get pin to mode 6 on beagle bone black

Manuel Stühn freebsdnewbie at freenet.de
Wed Jan 15 21:09:06 UTC 2020


On Wed, 15 Jan 2020 10:50:20 +0100
Hans Bentum <jwbentum44 at gmail.com> wrote:

> Hello,
> 
> I tried several things to put pin 8_16 into mode 6 for usage by the PRU for
> high speed IO.
> Up to now without any luck.  I am using FreeBSD 12.1
> 
> Question: how can I put a pin on beagle bone black to mode 6?
> 

I've sucessfully run the PRU reading PRU-GPIN with a very similar setup as you describe and don't see why it should not work. 
Please try to gather some additional information:

- How are the gpio-pins actually assigned. This can be observed by booting in verbose mode (boot -v). 
- How does the actual used devicetree look like (sysctl -b hw.fdt.dtb | dtc -I dtb -O dts | less)

[... snip ...]

> I also tried to set the pinmux using the pru but no luck (as expected).
> https://vadl.github.io/beagleboneblack/2016/07/29/setting-up-bbb-gpio
> 
> #define P8_16                                 0x44E10838
>           MOV     r2, 0x26                     // val
>           MOV     r0, P8_16                  // address
>           SBBO    r2, r0, 0, 4                  // store

IIRC: You would have to enable OCP master ports in order to enable the PRU to write outside of its memory area.

-- 
Manuel Stühn


More information about the freebsd-arm mailing list