Above is the code I use to subscribe to the gpio service. When I only use GPIO 9 and 10 (SL6087) I can perform an adl_ioWriteSingle function call.
However when I add the third line with GPIO 20 (Also adjusting the array size and the first parameter of the adl_ioSubscribe call) then open AT throws an exception when the execution reaches the same adl_ioWriteSingle call.
R7.45.0 is the firmware I’m using.
Can anyone tell me what the problem could be? Much appreciated
EDIT: I’m figuring out the return value of the subscribe function
EDIT: adl_ioSubscribe returns 11. That’s odd, it is not ADL_RET_ERR_ALREADY_SUBSCRIBED, ADL_RET_ERR_FATAL or ADL_RET_ERR_PARAM.
EDIT: 11 matches ADL_RET_ERR_DONE (found in adl_gpio.h)
EDIT: From adl_gpio.h:
<b>#ADL_RET_ERR_DONE</b> refers to the field #adl_ioError_e for more informations.
I don’t know what field this is about, but it might be a clue?
EDIT: The adl_ioError_e refers to the 3 MSB bits of the elements of the adl_ioDefs_t array.
EDIT: the adl_ioError field is GPIO20 is ADL_IO_ERR, for GPIO10 it is ADL_IO_ERR_USED (Weird because this is the only adl_ioSubscribe call)
That ARM exception looks like a memory violation. When you add the third record to the adl_ioDefs_t structure, do you change the size to 3 and the first argument of the adl_ioSubscribe function to 3, like so:
The problem seems to be with GPIO 9 and 10, note thhat tese are muxed with UART1 for the SL6087. DTR1 and RI1 more precisely.
Am I able to use the UART1, if I’m only using Rx and Tx, and these IO’s at the same time?