This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to configure GPIO pins for OMAP-L138, WinCE 6.0, Zoom EVM

Other Parts Discussed in Thread: OMAP-L138

Hi,

We're using a Zoom EVM for the OMAP-L138, WinCE 6.0.  I see from gpio.h and gpiodefs.h how to set/get a gpio pin for direction and level, but I don't see how to configure a pin to be gpio when that particular pin could be one of several things from the schematic.  From the GPIO User's Guide:

2.9 Initialization

The following steps are required to configure the GPIO module after a hardware reset:

1. Perform the necessary device pin multiplexing setup (see your device-specific data manual).

2. Program the Power and Sleep Controller (PSC) to enable the GPIO module. For details on the PSC,

see see your device-specific System Reference Guide.

3. Program the direction, data, and interrupt control registers to set the configuration of the desired GPIO

pins (described in this document).

The GPIO module is now ready to perform data transactions.

************

My Platform Builder is configured for GPIO, and there were no pinmux issues on build.

The PSC Manual is confusing in that I can't tell how to "program" it to enable the GPIO module.  It looks like it's always ON, can't tell.

I can set direction and level, and see those with the get functions, so I think the registers are working.  When I use a scope, I get high when it should be low. So there seems to be a disconnect between the registers and the hardware.  Something isn't turned ON. 

What am I missing here?  How to turn the hardware ON?

Thanks, DM

  • Hi

    Did you manage to solve it? I am having the exact same issue. I did the following

         EVMOMAPL138_lpscTransition(PSC1, DOMAIN0, LPSC_GPIO, PSC_ENABLE);
        EVMOMAPL138_pinmuxConfig(PINMUX_GPIO_BUFF_OE_REG, PINMUX_GPIO_BUFF_OE_MASK, PINMUX_GPIO_BUFF_OE_VAL);
        GPIO_setDir(GPIO_BANK0, 15, GPIO_OUTPUT);
        GPIO_setOutput(GPIO_BANK0, 15, 1);
        GPIO_setOutput(GPIO_BANK0, 15, 0);

    According to the datasheet this should work but its not working I even checked on if the registers are responding to the changes and they are, but on the level on the GPIO was still high when measured.

    Samuel

  • Hi Samuel,

    In our case of WinCE6.0, most pin selections must first be configured in the bsp_cfg.h file/OS, in this case for GPIO, and you must rebuild the image after changes in that file.  If you look at the GPIOTest code example, there are 2 pins that are specificaly used for that example, and they are also defaulted to GPIO in the bsp file.  (One pin may conflict with one of the LCD lines because although I was able to set the GPIO pin, my LCD screen went dark.)  They tell you that the LogicPD Zoom board is heavily pinmuxed, so you really have to work to find pins with no or few conflicts depending on what you want to use in the system.

    1) Use Pinmux utility first to make sure no confflicts

    2) Look at circuit diagram also for conflicts. 

    3) Make appropriate changes in bsp_cfg.h file. 

    4) Include required SPI headers.  See code example for includes, formatting, etc.

    5) Implement in code with the APIs specified in gpio.h and gpiodefs.h.  (Those names are close anyway.) 

    6) Like you, I checked registers also, and they also responded, but the hardware/pins didn't. 

    7) Don't know why this kind of thing (using the bsp_cfg.h file) can't easily be found in the documentation (I never saw this anywhere).  Tribal knowledge for some reason.  We're working with a third party company for support.  We found that we couldn't do this on our own due to lack of implentation information, specifically, small but critically essential elements.   

    Hope this helps.

    DM