This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320C6745: Uart_v0 implementation

Part Number: TMS320C6745

Hi,

there is a strange implementation in uart_v0.c in the pdk.

In case of error, the interrupt callback calls a function to manage the error:

 

static void UART_v0_hwiIntFxn(uintptr_t arg)
{
UART_Handle handle = (UART_Handle)arg;
UART_V0_Object *object = (UART_V0_Object*)handle->object;
UART_HwAttrs const *hwAttrs = (UART_HwAttrs const *)handle->hwAttrs;
uint32_t intType;

while (TRUE)
{
intType = UART_intIdentityGet_v0(hwAttrs->baseAddr);
if (intType & UART_INTID_RX_THRES_REACH)
{
/* RX FIFO trigger or char timeout interrupt */
if ((intType & UART_INTID_RX_LINE_STAT_ERROR) ==
UART_INTID_RX_LINE_STAT_ERROR)
{
/* RX line status error */
UART_procLineStatusErr(handle);
}

but the implementation of this function is:

 

static inline void UART_procLineStatusErr(UART_Handle handle)
{
UART_V0_Object *object = (UART_V0_Object*)handle->object;
UART_HwAttrs const *hwAttrs = (UART_HwAttrs const *)handle->hwAttrs;
uint32_t lineStatus;

if (object->readSize)
{
lineStatus = UART_readLineStatus_v0(hwAttrs->baseAddr);

..... (error callback & interrupt disable)

if object->readSize is 0 with interrupt enabled the firmware will hangs with continuous interrupt with no callback.

I don't know when it happen (interrupt enabled with readsize=0) but it happens.

Regards.

  • Hello Andrlach,

    Thank you for your question, my name is Andrew and I would be more than happy to assist you with this.  Allow me to research this subject further and consult with my colleagues familiar with this device.  I will update you with our progress as soon as possible.

    Best regards,

    Andrew