Configure GPIO in Uboot/MLO at Power ON in BeagleBoneBlack


#1

Hello,

I’m trying to configure P8_10 of beaglebone black in uboot as LOW. Have successfully done that by configuring the gpio in /board/ti/am335x/board.c in the function,
spl_start_uboot().
The pin by default stays HIGH. After compiling new uboot I have been able to configure it LOW.
The problem is that the pin goes LOW only after few milli seconds. I want the GPIO Pin to stay LOW always on Power ON without any glitch.
Does anyone have any idea how this can be achieved?

Thanks.


#2

@Sohan2017, You’ll also have a small glitch between U-Boot -> Kernel, even with gpio-hog enabled on that pin. In your current design with P8_10 it would be best to utilize the pin’s default state (low) to achieve what you want by using an invertor logic.

Regards,


#3

Yes, but the problem is that I’m using P8_09,P8_10,P8_11,P8_12 as gpio and want them to be low on boot-up. P8_11 and P8_12 stay low on boot up so using a invertor logic will make 09,10 low but 11,12 high.Any other possible solution?? Tried making P8_11 and P8_12 high on boot up but same result there is a glitch.

Thanks a lot.


#4

Well that is definitely more complex then your original post. Take a look at the BeagleBone Black Wireless design, we used a multi pin voltage isolator with an enable pin between the am335x and wl1835 to ensure no signal glitches too we were ready to connect to the wl1835.

Regards,


#5

Currently I’m editing the file board/ti/am335x/board.c. In that I have configured the pin in spl_start_uboot() function. Is there any other way to atleast reduce the glitch time even more? or somewhere in X-loader?
Also the uboot is getting loaded from MicroSD. I would want to copy it to eMMc so that I can get the actual time as I have to press SW2 everytime I boot up.

Also I wanted to know that is it the hardware limitation that the Pin P8_10 and P8_09 goes High on boot-up? or it gets configured High through X-loader?

Thanks a lot.


#6

Doing it in SPL is as early as you can do it…

Use the same instructions you used to copy MLO/u-boot.img to the microSD, it’s the same dd offset.

The default “reset” state of P8_10(U6) and P8_09(T6) is Pull-Up…

The X-Loader project is long dead, it’s functionality got returned to U-Boot, if you are still using X-Loader, you have other issues to deal with.

Regards,


#7

Thank you very much for your prompt reply.
Just one last query,

The default “reset” state of P8_10(U6) and P8_09(T6) is Pull-Up…

That means that it is the am335x processor’s default configuration that sets it to Pull-Up which cannot be changed on user level?

Thanks a lot.


#8

Correct, at “power-on” the default state of those pins is “High” on the am335x… You can change it to low in u-boot, but at the point it was already “high” from power on.

Thus if you want a guaranteed known state at startup on the am335x, you will have to use either an invertors or an isolators as mentioned.

Regards,