Gpio management problem

Hi,

I try to control a gpio using this code. It compiles, runs, but voltage on gpio19 is still null… Does someone have an idea ?

s8 HANDLE_GPIO; 
const adl_ioConfig_t MyGpioConfig1 [ 1 ] = { { ADL_IO_Q2686_GPIO_19, 0, ADL_IO_OUTPUT, ADL_IO_LOW }};

void adl_main ( adl_InitType_e  InitType )
{
HANDLE_GPIO = adl_ioSubscribe ( HANDLE_GPIO, MyGpioConfig1, 0, 0,	0 )
adl_ioWriteSingle(HANDLE_GPIO, ADL_IO_Q2686_GPIO_19, ADL_IO_HIGH);
}

I use GCC compiler, OpenAT 4.00.b04 and a09_0ggg.Q2686H 0026016CAE5DC7FF Firmware on a Q2686H Wireless CPU

Thanks

Hi gdt,

I don’t have any known about this module, but have you look in the module datasheet?
Perhalps this gpio needs a pull up resistor to get high level.

Regards,
skos

Hi skos,

When I change ADL_IO_LOW to ADL_IO_HIGH in MyGpioConfig1, i measure 2.8v on this gpio. When I try to change the port state with adl_ioWriteSingle, the pin state stay at the value used in MyGpioConfig1… I would have a state change without pull up resistor, right?

Thank you for your response.

Regards,

gdt

Hi gdt,

I looked in the datasheet.
GPIO_19 describe an Z-state after reset.
So you should connect an external pull up resistor to have a clean behaviour.
But I don’t know why you can change sometimes the value.

Best regards,
skos

I have tried to add a pull up resistor, but the pin state didn’t change…
Thank you skos for your responses. If anyone have another idea :wink:

Have a good week-end

Regards

Gdt

I made a stupid error in the adl_ioSubscribe…

s32		GpioHandle; 

adl_ioConfig_t Gpio19Config [1] = {{ ADL_IO_Q2686_GPIO_19, 0, ADL_IO_OUTPUT, ADL_IO_HIGH }};

GpioHandle = adl_ioSubscribe ( 1, Gpio19Config, 0, 0,	0 );

The first parameter of adl_ioSubscribe is the selected configuration in the array Gpio19Config and not the handle…

Thanks for your responses