Hello Robert, 

if I get this correctly, setting the direction of a gpio via the 
corresponding register (e.g. let's say gpio4 base_addr + 0x134) should be 
avoided?

We use the BBB in combination with a carrier-board to have some industrial 
in- and outputs. Therefore, some pins enable some flipflops during 
initialization (the pins need to be outputs). These pins are later on used 
as inputs. The current implementation manages all this with an assembly 
program running on the pru and directly setting the right bits in the 
different registers of the gpios. 
Now, I want to port this to the BB AI. Since direct access causes trouble, 
is there a better practise, than setting the direction/value of a gpio via 
/sys/class/gpio?

Regards,
Stephan 


Am Donnerstag, 26. März 2020 15:26:56 UTC+1 schrieb RobertCNelson:
>
> On Thu, Mar 26, 2020 at 9:20 AM John Allwine <jo...@allwinedesigns.com 
> <javascript:>> wrote: 
> > 
> > Is it possible to access the GPIO on the Beaglebone AI via /dev/mem 
> similar to how it is done in this stackoverflow question on the Beaglebone 
> Black? If so, how would I find what the offsets are? 
>
> Hi John, 
>
> dynamic changes to the am57xx's pinmux registers and gpio values is a bad 
> idea.. 
>
> Figure out what you need and set them up in the device tree. 
>
> Regards, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/2ee15690-0da0-4cc0-889b-6f3c8326c5aa%40googlegroups.com.

Reply via email to