Project

General

Profile

GP0[4] state on boot for L138F

Added by Mostafa Afgani almost 6 years ago

Hi, we noticed that the power on state of GPIO_0_4 is that it is driven high. I am a little confused about this since I can't see anything in the U-Boot source code (u-boot-mitydspl138/board/davinci/mityomapl138/) changing PINMUX1 from the default state (Z for GP04).

Any idea why this is the case? Thanks.


Replies (4)

RE: GP0[4] state on boot for L138F - Added by Michael Williamson almost 6 years ago

Hi,

If you check the OMAP-L138 datasheet (it's a bit convolved) Table 2-29, the GP04 pin pullup state is defined by CP2 group control in the PUPDENA / PUPDSEL registers after reset completes (during reset it should be pulled down).

To get the reset values of the PUPDENA and PUPDSEL registers, you need to look at the OMAP-L138 Technical Reference Manual.

Table 11-53 defines the PUPDENA CP2 bit as being a 1, so the internal pull-up or pull-down is enabled after reset.
Table 11-54 defines the PUPDSEL CP2 bit as also being a 1, so the pull up is enabled.

This is a common problem with folks using the OMAP-L138. After reset, until app code is running (in this case, u-Boot or the UBL) most of the pins with pull-up support are actually pulled-up.

I hope this clarifies things for you.

-Mike

RE: GP0[4] state on boot for L138F - Added by Mostafa Afgani almost 6 years ago

Hi Mike, thanks for the explanation. As we need this pin to be low on power-up, would the best place to set this be in the U-Boot mityomap config/init code?

RE: GP0[4] state on boot for L138F - Added by Michael Williamson almost 6 years ago

How quickly do you need it to be low? You might put an external pull down on your board.

You could disable the pull up, but keep in mind the OMAP-L138 controls for the pull up are in groups, so you will affect other pins when you disable or change the pull state.

We have code in u-Boot to disable the pull-ups for pins associated with the ethernet MAC pins as they are used by many PHYS for boot strap options, but the u-Boot code takes several milliseconds before it gets loaded and run....

-Mike

RE: GP0[4] state on boot for L138F - Added by Mostafa Afgani almost 6 years ago

How quickly do you need it to be low? You might put an external pull down on your board.

Pretty much instantly would be ideal as we use it as a /SHUTDOWN control for some hardware that should only be brought up once the Mity is fully booted up. We already have a 10k pulldown but that seems to be too weak (that's how we discovered that the pin wasn't Z).

We have code in u-Boot to disable the pull-ups for pins associated with the ethernet MAC pins as they are used by many PHYS for boot strap options

Yup, noticed this.

but the u-Boot code takes several milliseconds before it gets loaded and run....

We can probably live with a delay of around 40ms so that's not too bad. However, we'll try a stronger pull-down first.

Thanks!

    (1-4/4)
    Add picture from clipboard (Maximum size: 500 MB)