gdt
April 13, 2006, 10:17am
1
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
skos
April 18, 2006, 7:34am
2
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
gdt
April 18, 2006, 8:36am
3
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
skos
April 18, 2006, 9:18am
4
gdt:
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?
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
gdt
April 21, 2006, 3:25pm
5
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
Have a good week-end
Regards
Gdt
gdt
May 10, 2006, 12:46pm
6
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