As a first step I recommend to use our iMX7 Gpio Tool to toggle some of the X40 pins:
Let’s make an example. In the Aster Carrier Board V1.1 Datasheet, Section 3.9.3 we find the following mapping:
Aster.X40-16 = CIF_D_1 = SODIMM-98
Now we can use the GpioTool to modify the settings for this particular SODIMM pin 98:
The GpioTool also shows us the mapping to the i.MX7 specific GPIO number
This might not be relevant, but I mention it because many of our customers mix up the Gpio number with the SODIMM number.
Try to modify Direction and Level and measure how the state of the connector pin X40-16 changes. Make sure the AltFn is set to “GPIO”.
Now as you were able to change the pin state with the tool, you just need to do the same configurations in the code through the Toradex Ce Libraries.
Use the Gpio Demo application as a starting point. The basic instructions you need to execute are:
uIo x40_16 = COLIBRI_PIN(98); // or uIo x40_16 = GPIO(139);
hGpio = Gpio_Init(NULL);
// Set X40-16 to "1" (Variant 1)
Gpio_SetDir (hGpio, x40_16, ioOutput);
Gpio_SetLevel (hGpio, x40_16, ioHigh);
// Set X40-16 to "1" (Variant 2)
Gpio_SetConfigString(hGpio, x40_16, NULL, L"altfn=-1,dir=out,lvl=1", StoreVolatile);