GPIO management question (firmware/core sw mismatch?)

Hi,

Product: Q2406B, Open AT V3.10
AT+CGMR : 655_09gm.Q2406B 2015268 111705 17:01
Core software directory name: 655

I have been experiencing strange behaviour during io management and lost a day.

My problem is, I can not get the expected behaviour during adl_iosubscribe and adl_iowrite

list of strange cases where telemetryHandle is insistently assigned: ADL_RET_ERR_PARAM

telemetryHandle = adl_ioSubscribe (ADL_IO_Q24X6_GPO_0, 0,	ADL_IO_Q24X0_GPO_0, IO_POLL_TIME, ioHandler );
telemetryHandle = adl_ioSubscribe 
(ADL_IO_Q24X6_GPO_0, 0xFFFFFFFF, 0x00000000, IO_POLL_TIME, ioHandler );
telemetryHandle = adl_ioSubscribe (ADL_IO_Q24X6_GPO_0, 0xFFFFFFFF, 0x00000000, 0, NULL);

a case of succesfull subscription but failure to toggle the port by ioWrite
here result is always OK but the io value fails to toggle. the gpio read value is stuck at FFFFFFF8.

telemetryHandle = adl_ioSubscribe (ADL_IO_Q24X6_GPIO_0, 0, 0x00000000, 0, NULL);

void ioTester( u8 ID)
{
	s8 result;
	if(testFlag)
	{
		result = adl_ioWrite( (u8) telemetryHandle, ADL_IO_Q24X6_GPIO_0, 0);
		myTrace(1, "IO Tester Reset ");
		testFlag = FALSE;
	}
	else
	{
		result = adl_ioWrite( (u8) telemetryHandle, ADL_IO_Q24X6_GPIO_0, ADL_IO_Q24X6_GPIO_0);
		myTrace(1, "IO Tester Set ");
		testFlag = TRUE;
	}
}

Why can’t I subscribe in case 1, 2, 3 and why do I fail to toggle in the last case?

Ps: I am suspecting this: Should my core software directory be named 655_09gm? Because my revision is 655_09gm.Q2406B but the directory is named 655 only. (open at settings screenshot in the openat tutorial page 23 shows 655_gg.v13 in the combo.) I installed directly from the Open AT cd so why should there be a configuration mismatch with the core software and firmware I can’t imagine.

Best Regards,
Yigit Erdal Bora

My opinion (didn’t test to prove it):

  1. You are trying to subscribe a handler on output (GPO_0). Handler only triggers on inputs.
  2. You are trying to set output (GPO_0) as input. Won’t go.
  3. Same as 2.

Toggle demo: an explanation may be that you are using UART2, which reserves some port pins. Check which pins in manual and read about +WMFM command also. Try some other pin.

Thank you very much for the last reply. I am now using a port not related with UART2 (even though I am sure UART2 is disabled). What is strange is this:

I am trying to toggle the output value of a GPIO by calling

adl_ioWrite( (u8) telemetryHandle, ADL_IO_Q24X6_GPIO_4, ADL_IO_Q24X6_GPIO_4)

then reading the pin values and then calling

adl_ioWrite( (u8) telemetryHandle, ADL_IO_Q24X6_GPIO_4, 0)

The function calls return OK but readings show that IO value is stuck at 1 . I tried this with other pins but still the same result. Should I put a resistor load on the physical pins to make it work? I am currently only checking the result by making a io_read on the same handle ( adl_ioRead( (u8) telemetryHandle) ) There is also 2 seconds delay between calls to ioWrite. If I can solve the io problem it will be all ok, because everything else works :slight_smile:

Best Regards,
Erdal

I had the same problem,
I have found that all outputs GPO1,2,3 works OK
but if I subscribe and use GPO_0 don’t work.
Perhaps the reason is that GPO_0 is multiplexed with SPI_AUX?
How I can use GPO_0 in GPIO mode?

I have FW version _657
with Q24PL002 (Q24 Plus engine)

regards,
Nicola

i suspect that gpo0 cannot be used because of module firmware uses gpo0 to set the sim driver level. (q2400 customer design guidelines 2.2.6.3 sim3v/5v management. revision 4). Perhaps this only happens on the development board.

by setting the sim to 3VONLY you can use GPO_0.

at+wfm=1,61
set sim 3vonly