We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Showing results for 
Search instead for 
Did you mean: 
Observer bhavinlapasia
Registered: ‎05-18-2018

AXI UART 16550 transmitting multiple messages fails


I am using an AXI UART 16550 in my design on Picozed board. I have set FIFO depth to 1024 bytes. I am sending scheduled messages through this UART which are < 1024 bytes (all combined). If they get scheduled at same time as explained below in psuedo code

if(Message1send())     // If scheduled to send MSG1
if(Message2send())     // If scheduled to send MSG2
if(Message3send())     // If scheduled to send MSG3

So when all 3 are true, only MSG1 is transmitted and not the remaining two. When there is no timing conflict then no such problem occurs.

In BSP generated in SDK for UART, in function XUartNs550_Send() there is something which I am not able to understand

 * Enter a critical region by disabling the UART transmit interrupts to
 * allow this call to stop a previous operation that may be interrupt
 * driven, only stop the transmit interrupt since this critical region
 * is not really exited in the normal manner
IerRegister = XUartNs550_ReadReg(InstancePtr->BaseAddress, XUN_IER_OFFSET);
XUartNs550_WriteReg(InstancePtr->BaseAddress, XUN_IER_OFFSET, IerRegister & ~XUN_IER_TX_EMPTY);

What I understand is that we are disabling the TX holding register empty interrupt. Also the explaination in comments is bit unclear to me as to why UART TX interrupts have to be disabled. Can this be the reason that the messages are not sent?

Or can someone explain that why this is happening? How to resolve this?




0 Kudos