Problem using VF50 SODIMM PIN 37 as GPIO Output

in our Project we are using SODIMM PIN 37 as GPIO output. With the old PXA300 Colibri it works fine. But I cannot configure this PIN with the VF50 to output High. If I do that with yout GPIO Config tool, the PIN is switching between 0 and 1. We are running your latest Windows CE image on the VF50. Is there a Windows CE driver controlling this PIN? If yes, how I can deactivate this driver in the registry to get full control over this PIN? All other GPIOs which I using working fine.

I just tried using this on Evaluation board and I can toggle PIN 37 the way I want.

I used Vybrid GPIO tool V1.2

Are you trying on EVB or some other hardware?

In your Eval board it is working. But in your board the PIN is open. Can you drive for example a LED with this PIN?
If I disconnect a cable connector in our PCB I can set the PIN to HIGH. But this state is very sensitive. But if I just touch the PIN with the scope probe, the state of the PIN switches to low again. It seems that it is not a “real” output.

I testet in in your board. I removed the jumper. Same result. If I touch the PIN with the probe it goes down to low. It seems like open drain.

I wired pin to LED and was able to drive it. What version of evb do you have

I found now the same issue. I will check what happens.

We have the evb version V3.2A and Colibri VF50 V1.2A. I tried a second VF50, same result. If I connect the probe I measure somethink like sinus wave with about 0,3V.

Now I read back the controller setting of PIN 37 with Gpio_GetConfigString. The controller settings are completly different from my settings. For outmode I read back op. This is open drain!!!

Open drain is the cause.
Could you please set PIN 37 outmode as standard using Toradex CE library.

 uIo io1 = {37, ioColibriPin};
 success = Gpio_SetConfigString(hGpio, io1, NULL, L"altfn=-1,dir=out,outmode=std", StoreVolatile);

You don´t understand what I mean. Please read the answer of your colleque. He found the same issue. Of course I set the outmode=std. But I read back op! All other output pin I´m using on the VF50 are working fine. There is an issue with your library or your hardware!

So I did some more test.
Connecting PIN37 to LED on EVB and executing this lines of code make LED blink.

HANDLE hGpio = NULL;            ///< handle to the GPIO library
BOOL   success;
DWORD  irq;
int    i, j;
uIo pin;

// === Initialize GPIO library. ===
// We don't use registry-based  configuration, thus we can
// pass NULL go Gpio_Init()
hGpio = Gpio_Init(NULL);
ASSERT(hGpio != 0);
success = Gpio_Open(hGpio);

pin.GenericDefinition = IOCOLIBRIPIN(37);
pin = Gpio_NormalizeIo(hGpio, pin);

Gpio_SetConfigString(hGpio,pin,NULL, L"altfn=-1, dir=out, lvl=1 outmode=std",StoreVolatile);


// === De-Initialize GPIO library ===
success = Gpio_Close(hGpio);
success = Gpio_Deinit(hGpio);

Also reading back I get correct value. Do you use our latest releases?
I also used Reg access tool to monitor the register for this pin. Address is 0x40048050 if you want to check it. Bit 10 has to be set to 0.

I use your latest Windows CE 6.0 and I installed the new VF50 Libs. I use the same code like you.
With your Reg access tool I read back 0x3523. This means Bit 10 is 1 => open drain. I checked a second colibri, same issue with this gpio. Again, all other outputs are working.

If I try to set a new value with your Reg access tool, it crashes with a serious error.

I´m wondering, 4 Days ago you wrote that you found the same issue. Can you turn on your LED continously and measure high with your scope?

Did you try manually resetting bit 10 to 0? Does it work then?

Yes I have seen the issue but I did not set outmode because I assumed its set by default.

If try to set a new value with a batch file, I used 0x3123, your reg access tool crashes with a serious error.

Can you tell me which value I have to set in the reg access tool and which format I have to use?

Now I started the Reg access tool on the colibry and set the value 0x3123.
I can read back this value with the Reg access tool.
Now I can set the output to high with your gpio config tool and I measure high with the scope
At last I start my software and read back settings: outmode=std
Now I set the level of the gpio with my software to low and high. It works fine.

Result: Your gpio config tool and your library are not be able set the outmode for this gpio.

Now I played around with another gpio. This gpio is outmode=std by default. So I try to change the outmode of this gpio to open drain by outmode=od. I read back the settings of this gpio: outmode=std!!! This command takes no affect. So I think there is an issue with your library by setting the outmode for all gpios.

Please attach the debug output to your message. You can see here how to enable it.

Also please upload all your library package and project to and post link here.

I’ve found the cause of the problem. I made some changes in the visual studio project linker configuration and now it works as a debug version. But if I create a release and copy the exe file to the flashdisk the issue occurs again. Did you test in debug and release mode?

Yes I tested both and they both work properly.

I uploaded you the exe → its build in release and it will toggle up and down for 100 times.

Thank you! And again is not working in debug mode. :-(((

With your gpio demo project I can configure the gpio 37 to outmode=std. But with my own project it fails. I tried to copy all your settings from the demo to my project. But I have no success. Both projects are using the same lib, the search path is the same. Do you have an idea please?