1 1
wollik

Force/Change GPIO default values

Recommended Posts

Hi everybody,
I need your help in setting the default values of some or all GPIO Pin, so that it will be always activated after reboot instead of deactivated like the default is today.

The reason for this is that I've connected a relaisboard to some GPIO Pins that will need "1" to be deactivated . Everything works fine, I can control and work with these Pins like needed by using "1" for OFF and "0" for ON.


After booting up my BPI I initialize the needed GPIO Pins via export the pins. That will create virtual directories for these Pins with these defaults:

    direction -> in

    value -> 0

Like I mentioned, my relaiseboard need a logical 0 to be activated, so when I switch the direction to out, my motor on the related relay start to spin.

 

Doing a sequence of create via export, set direction to out and set value to 1 will we fast, but will activate the motor for a short time, this is what I must avoid!

 

Instead of rebuilding the HW for using the value "1" to been activated instead of "0" I try to change the GPIO default value from 0 to 1 what means deactivated/not active for my relaisboard.

 

Since this is a BPI M2 Zero and there are no newer images I think I need to do this via the script.bin file. 

I've found for my pin PA08 these entries, but have no idea what default means what:

    smc_sda = port:PA08<2><default><default><default>
   scr_sda = port:PA08<2><default><default><default>

Please can someone help me doing this or point me to an example how this must be done ?

Regards
WolliK

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
1 1