How do I change the pin mode to a new value even after rebooting? (Beaglebone Black)

42 views
Skip to first unread message

mathewst...@gmail.com

unread,
Jun 30, 2019, 1:51:51 PM6/30/19
to BeagleBoard
I am trying to connect an OV7670 camera module to the board, but for it to work the module needs a clock signal. I am using a PWM pin (P9_42). But every time I reboot the device I need to config the pin again. 

Is there anyway to make the pin configuration permanent so that it does not reset every time the device is restarted?

LuminousShadow

unread,
Jul 2, 2019, 10:28:04 AM7/2/19
to BeagleBoard
You can have the pins configured upon bootup with a custom device tree overlay.

Tools to make one: bb.org - overlay
If you follow the instructions listed in @RobertCNelson's readme file then you should be able to get started making one. A little heads up, have a station you can load the SD card into to remodify the uENV.txt file if you happen to have boot issues.


A few sources to learn more about them: 
wiki-Device_tree

Hope this helps.

TJF

unread,
Jul 2, 2019, 11:17:22 AM7/2/19
to BeagleBoard
Am Dienstag, 2. Juli 2019 16:28:04 UTC+2 schrieb LuminousShadow:
You can have the pins configured upon bootup with a custom device tree overlay.

Yes, you can specify the mux mode to connect the pin to the output of the eCAP module in a device tree blob. But can you configure the modules registers to generate a certain output?

I'd try a start script for systemd, ie. invoking a small libpruio prg to enable the desired output.

Regards

LuminousShadow

unread,
Jul 3, 2019, 11:06:30 AM7/3/19
to BeagleBoard
Yes you can. By creating the device tree binary overlay you can not only set the mux mode, but its output as well.

I'll add another resource that explains this:
http://derekmolloy.ie/gpios-on-the-beaglebone-black-using-device-tree-overlays/ (basically a walk-through on how to do it. However, its a bit outdated as "SLOTS" are obsolete).

TJF

unread,
Jul 3, 2019, 1:41:56 PM7/3/19
to BeagleBoard

Am Mittwoch, 3. Juli 2019 17:06:30 UTC+2 schrieb LuminousShadow:
Yes you can. By creating the device tree binary overlay you can not only set the mux mode, but its output as well.

I'll add another resource that explains this:
http://derekmolloy.ie/gpios-on-the-beaglebone-black-using-device-tree-overlays/ (basically a walk-through on how to do it. However, its a bit outdated as "SLOTS" are obsolete).

Nonsens!

This is good, but obsolete stuff. Nothing about PWM output from an eCAP module. Only about GPIO, using sysfs to manipulate the settings.

From a device tree blob you cannot manipulate the register settings unless the driver supports this. And the PWM driver has no such feature, yet,

Regards

LuminousShadow

unread,
Jul 4, 2019, 2:47:02 PM7/4/19
to BeagleBoard
When you figure it out, share with the rest of us.
Reply all
Reply to author
Forward
0 new messages