M66 UART Transmit Completed Callback

Hi
I am trying to send data with open cpu sdk v2.4.
Is there any callback function when transfer complered in tx buffer?

Regards

Dear muharremerbay

You mean the backfill function when the UART is sent?There is no callback function when the data is sent, and no callback function when the data is received.

Thanks for reply. I want to use uart with half duplex RS485 ic. So I need to reset TX_EN gpio pin after transfer completed. Is there any synchronous method for uart transmit?

Dear muharremerbay

If you use OPEN mode, you can add a chip with MAX485 and use a GPIO to control its transceiver state, then 485 communication can be realized.

hello.
module: EC25
i have a code:

		iRetGPIO = Ql_GPIO_Init(m_GpioPin, PINDIRECTION_OUT, PINLEVEL_HIGH, PINPULLSEL_DISABLE);
         .....
		Ql_GPIO_SetLevel(m_GpioPin, PINLEVEL_LOW);
		iRet = Ql_UART_Write(fd_uart, uartBuf, uartBufSize);
		Ql_GPIO_SetLevel(m_GpioPin, PINLEVEL_HIGH);

but on the pins i have these image:

the only way out is timeouts?

with the timeouts I am losing 600μs before sending the package. if the speed is 9600 - these losses are acceptable, but with increasing speed they will be significant.
is there a mechanism that will reduce these losses?

@Denis_Syrf: hello
In case of Bit loss at high baud rate, please delay sending data by UART after pulling the low level function for a short time.

i cannot use a RTS pin as flowcontrol (same as in linux)?
or there is a uart buffer emptying event?
i need make a timeouts?
i mean it’s no best way, because the delay as shown 600us not stable. sometimes it increases to 1ms.
and, I believe that with an increase in the number of threads in the user program, this delay will not become even greater

Dear Denis_Syrf

It is ok to use hardware flow control, but you need to confirm that the serial port you use supports flow control, but some serial ports in the module do not. Please refer to the module’s hardware design manual for confirmation.

Hi There

I was sitting with the same issue and Quectel added this feature in OpenCPU_GS3_SDK_V2.2
February 02 2018. 1.Added the parameter QL_UART_TX_BUF_SEND_OUT for Ql_UART_GetOption to check whether the serial data is sent out or not.

So currently im using

while (Ql_UART_GetOption(UART_PORT3,UART_TX_BUF_SEND_OUT,NULL) < 1)
{

}
Ql_GPIO_SetLevel(PROT_RS485_RE, PINLEVEL_LOW);

Hope this helps