cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4

ansh_2022771
New Contributor II

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
EunchongP_51
Employee

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
New Contributor II

Anyone from Cypress ?

0 Likes
EunchongP_51
Employee

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