I’m trying to use the UART2 of my Q2406B module.
I did activate the UART2 and checked it through AT interface:
I got UART2 connected to a device sending data at 4800bps.
First I followed jan’s topic instructions to set the speed up on the serial port:
adl_atCmdCreate( "AT+IPR=4800", ADL_AT_PORT_TYPE( ADL_AT_UART2, FALSE ), Res_IPR_Handler, "*", NULL );
In the handler i can see the response of the module is “OK”.
Now i subscribe to the fcm handler:
HandleUART2 = adl_fcmSubscribe( ADL_FCM_FLOW_V24_UART2, UART2fcmCtrlH, UART2fcmDataH );
And in the Control handler i receive the event which indicates that the flow was correctly opened. Then i switch to DATA Mode and the Control handler is called again with the event indicating that it went to DATA MODE.
However, the DATA handler is never called as if it didn’t receive anything.
Any hints please?
I’ve spent the whole day trying things with UART2 and have observed something:
If I send data using:
it works. However since I need to use raw data and try to send it with
adl_fcmSendData i experiment the following behavior:
When i call this function first i get the next message:
According to the documentation it means: Success, but the last credit was used.
Now i am supposed to wait for ADL_FCM_EVENT_RESUME in my control handler but it doesn’t arrive.
Of course the next times i try to send data the error code is as follows:
which means that the flow’s got no more credit to use.
I don’t know how to sort this out, could please anybody help me?