Jump to content

Recommended Posts

Posted

Hi,

 

I'm using banana pi m1+ with armbian legacy kernel. I'm building an application with c sharp and using mono to run in in the banana pi.

 

My application needs to change gpio output levels multiple times while running, so I installed bcm2835 library in the banana pi to control the output level from the application. Using the library, I was able to control those as I want, but I'd noticed that there are default gpio output levels, which are different from each gpio pins. I'm using CON3-P36 and CON3-P38. Right after the boot up, CON3-P38 goes high, while CON3-P36 goes low. I want to adjust the CON3-P38 to go low in the boot up, so that both two have low output as default.

 

I tried changing fex configuration in the script.bin file. In the [gpio_para] section, there is configuration for each gpio like this.

gpio_pin_38 = port:PE01<1><default><default><default>

I guessed the last <default> would be for the output level, so tried changing it to <0>, but did not change anything.

 

Is there any way to set the default gpio output level?
 

Posted

@Kimberly Did you solve your problem? I'm also struggling with initial gpio mode and state.

 

Is it possible to easily set those settings without modifications of script.bin or dtb file? In my case my Banana Pro controls light relays and after, eg. power outage the gpio's gets default settings, which leads to incorrect relays state. Currently I'm storing gpio state and mode in some file and restore it on boot in rc.local, but it is not the best solution since invalid relay state persist for about 1 minute (until boot process reach rc.local script). This is really annoying especially in the night when eg. at 2:00 AM, lights in my bedroom turns on :)

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines