FX3 UART callback working

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi all,

     I have been trying to understand the UART call back mechanism. (RX_DATA , RX_DONE , TX_DONE events). I couldn't completely get an idea about when the call back function gets triggered and when which event will be triggered. I could find any data explaining this uart call back. If someone provide me a detailed explanation about the UART callback working it would be helpful.

Thanks in advance,

Regards,

Ashlin Surey. A

0 Likes
5 Replies
ManaskantD_51
Employee
Employee
Welcome! 25 solutions authored 10 solutions authored

Please find the explanation of various events below:

CY_U3P_UART_EVENT_RX_DONE   UART data receive operation is complete
CY_U3P_UART_EVENT_TX_DONE     UART data transmit operation is complete
CY_U3P_UART_EVENT_ERROR       An error has been detected.
CY_U3P_UART_EVENT_RX_DATA      Data is available in receive FIFO.
0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi,

Thanks for your explanation. I tried to find the callback triggering mechanism by using GPIOs. I have attached my code here. I found that,

1. The RX_DONE  and TX_DONE events occur only during DMA mode that too only when the value given in the CyU3PUartRxSetBlockXfer CyU3PUartTxSetBlockXfer APIs is not equal to 0xFFFFFFFF.

2. The RX_DATA event occurs only in the register mode.

These are my findings. Correct me if I am wrong.

Regards,

Ashlin Surey. A

0 Likes

It seems correct.

0 Likes

> The RX_DATA event occurs only in the register mode.

How did you figure this out?

0 Likes

Hello,

This can be found in the Page 575 (UART_STATUS register description) of FX3 TRM. The snapshot of the same is given below:

JayakrishnaT_76_0-1634636685876.png

Best Regards,
Jayakrishna
0 Likes