Hi Ken!

Am Donnerstag, 29. November 2018 19:16:37 UTC+1 schrieb Ken Shirriff:
>
> Libpruio looks like an interesting library. I thought, though, that the 
> device tree was the "official" way to configure pins.
>

Libpruio is used in many projects, in university projects, at manufacturer 
plants or at home. Ie. at my house I use it to control a solar system. 
Currently it's some kind of insider's tip, since it isn't well supported by 
the board here.
 

> Does libpruio just configure the pin registers directly? Is that "allowed"?
>

Yes, the LKM configures the Control Module registers directly, fast and 
reliable. Who allows that you switch on your board? Ask her/him if using 
libpruio is allowed as well.


> So my question here is if it's okay to configure pins directly through the 
> pinmux registers (either through libpruio or my own code) or if there's a 
> good reason to use device trees. (Personally, I'd rather deal with the 
> registers than with device trees.)
>

The kernel also 'configure pins directly through the pinmux registers', but 
only during the boot process. Config-pin tool switches pre-defined 
configurations from user space, without rebooting for every change. And 
libpruio does the same, but isn't limited to pre-defined values.

Indeed you need not care about pinmuxing at all. Ie. just specify the PWM 
output you need at a certain pin, and libpruio does the register settings 
for you (pinmuxing as well as the subsystems hardware registers). When you 
want to switch to another pin, you can perform by just adapting the pin 
parameter in your code (single source). All settings are active while your 
code is running. Finally the destructor restores the system to the original 
state (like it was befor starting your code - if you don't block that 
default feature).

Anyway, I recommend to use a very simple device tree blob in order to just 
claim the used pins, so that other software will not disturb your 
configurations. But that is optional and can be done later when your PCB is 
burned.

Check some examples and see what I mean. Since version 0.6 it has an 
inbuild PRU driver to run firmware on the other PRU.

Regards

-- 
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/2614cf59-df8e-479b-a678-fd9b6e6afefc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to