Problem using VF50 SODIMM PIN 37 as GPIO Output

Now I write function which by bypasses your software library and directly call the dll function to set the outmode:

 BOOL VybGpio_SetOutMode(HANDLE hGpio, uIo io)
    {
        tVybGpioConfig *vybGpio  = hGpio;
    
        cspddklib = LoadLibrary(TEXT("CSPDDK.DLL"));
    
        IOMUXConfigurePin = (IOMUXConfigurePin_FN)GetProcAddress(cspddklib, TEXT("IOMUXConfigurePin"));
    
        return IOMUXConfigurePin(vybGpio->ioMuxVa + io.Gpio.Nr,
                                 DEFAULT_MUX_MODE,
                                 DEFAULT_MUX_SPEED,
                                 DEFAULT_MUX_SRE,
                                 0,
                                 DEFAULT_MUX_HYS,
                                 DEFAULT_MUX_DSE,
                                 DEFAULT_MUX_PUS,
                                 DEFAULT_MUX_PKE,
                                 DEFAULT_MUX_PUE,
                                 DEFAULT_MUX_OBE,
                                 DEFAULT_MUX_IBE);
    }

In your gpio demo it works fine. I can set the outmode=std with my little function. But exactly the same code is not working in my project. Why?
I see a difference between the projects. My project is loading module fpctr.dll. Your project not.

Can you please zip me the project and upload it to share.toradex.com. And dont forget to copy the link here.

The cause for the problem is the interaction between functions of your library. After a call to I2c_Init it is not possible to set the outmode. Now I moved the code for gpio initialisation before this function call and then it works. I hope there are no more other eastereggs like this. :wink:

What I2C channel do you use?

I2c_Init(L"I2C1") Please tell me, if you can reproduce the issue.

For your infomation: Some days ago I tried to setup the gpio in the bootloader menu. If I do that, the I2C module is not working anymore.

Please attach exactly the code you are executing. Then we will try and reproduce it.

I reduced your Demo project to minimum. See the values of szText from the watch window in the comments.

   #include "gpio.h"
   #include "I2c.h"
    ...  
    hGpio = Gpio_Init(NULL);
    ASSERT(hGpio != 0);
    success = Gpio_Open(hGpio);
    ASSERT (success);

    I2c_Init(L"I2C1"); 

    io1.Type = ioColibriPin;
    io1.Number = 37;
    io1 = Gpio_NormalizeIo(hGpio, io1);
    success = Gpio_SetConfigString(hGpio, io1, NULL, L"altfn=-1,dir=out,lvl=1,outmode=std", StoreVolatile);  // 
    success = Gpio_GetConfigString(hGpio, io1, NULL, szText, 150);

    // With I2c_Init(L"I2C1"); szText = "dir=out,lvl=0,altfn=-1,pull=none,strength=4,outmode=od,inmode=std,slew="
    // Without I2c_Init(L"I2C1"); szText = "dir=out,lvl=1,altfn=-1,pull=none,strength=4,outmode=std,inmode=std,slew="

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