M66 UART Transmit Completed Callback

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


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.

module: EC25
i have a code:

		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.