Setting I/O's

Dear Reader,

I have a question about the following problem.
On the PCB I designed I use the BBB for setting some pumps and valves.
When the system starts up the first seconds the IO pins are not logic 1 or 0.
Is it possible to set the GPIO’s in U-boot before starting up the kernel and how can I do this?

Thanks,

Maarten

Read the datasheet for the default state of each pin on power up.

http://www.ti.com/product/am3358

These cannot be changed. Once the SW is loaded, it can set the pins to whatever function it supports.

Gerald

Dear Gerald,

Isn’t it possible to set the IO’s in the U-boot?
before the kernel is started.
This would be fast enough.

Regards,

Maarten

Possibly. Not sure if Linux would like that or not. I would think it would have to be a custom UBoot just for your use in that case.

Gerald

From the top google hit on "uboot set gpio":

http://e2e.ti.com/support/arm/sitara_arm/f/791/t/248181.aspx

...it's even for a TI Sitara processor.

Executive summary:
Use u-boot commands to directly access memory to turn on the GPIO clock
and setup pinmux and gpio values as desired.

And here's the u-boot documentation page on memory commands:
http://www.denx.de/wiki/view/DULG/UBootCmdGroupMemory#Section_5.9.2.6.

All your programmable I/O pins are going to startup in tristate mode. That means you can just add a weak pullup or pulldown resistor (EG. 10K) to each pin’s circuit to make your external devices behave properly until your software programs the pins.

That is not correct. Please. Read the datasheet.

Gerald

Of course I would not assume that every I/O pins starts in tristate, but he said earlier:

On the PCB I designed I use the BBB for setting some pumps and valves.
When the system starts up the first seconds the IO pins are not logic 1 or 0.
That sounds to me like the particular pins he used do start in tristate.

Reading the datasheet is always the first thing to do, but once you confirm that an I/O pin is tristated then what would be wrong about using a weak pullup or pulldown resistor to keep those pumps and valves from doing some damage before you get the I/Os programmed?