UART internal interrupts not working as expected

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

cross mob
ansh_2022771
Level 2
Level 2
First like received First like given

I want to send 200 bytes via UART. I am using internal flag

From document

UART done – UART transmitter done event: all data elements from the TX FIFO are sent. This interrupt source triggers later than TX FIFO empty by time it takes to transmit a single data element. The TX FIFO empty triggers when the last data element from the TX FIFO goes to the shifter register. However, UART done triggers after this data element has been transmitted.

Problem: Based on oscilloscope observation, it seems transmit is still happening after the interrupt has occurred. Based on oscilloscope it seems entire transmit is hapening after transmit done interrupt.

Please suggest.

0 Likes
1 Solution

Hi Anish,

I cannot know your code. So, I just suggest example code.

My suggest is to use custom interrupt service routine. The below is my example code for UART internal flag.

The "uart_isr()" is custom interrupt service routine and the routine is set by "UART_SetCustomInterruptHandler()"

In the custom interrupt service routine, must clear the interrupt source.

pastedImage_2.png

If you cannot solve the issue by using the code, please share your code.

Thanks

Lucas Park.

View solution in original post

0 Likes
2 Replies
ansh_2022771
Level 2
Level 2
First like received First like given

Anyone from Cypress ?

0 Likes

Hi Anish,

I cannot know your code. So, I just suggest example code.

My suggest is to use custom interrupt service routine. The below is my example code for UART internal flag.

The "uart_isr()" is custom interrupt service routine and the routine is set by "UART_SetCustomInterruptHandler()"

In the custom interrupt service routine, must clear the interrupt source.

pastedImage_2.png

If you cannot solve the issue by using the code, please share your code.

Thanks

Lucas Park.

0 Likes