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.

SIO/DIO to IOM interface problem

Other Parts Discussed in Thread: TMS320C6424

I'm developing UART driver for TMS320C6424.

It is based on the model proposed in the recent TI's documentation and consists of IOM mini-driver with selectable class-driver interface.
IOM mini-driver looks to work now.

I've chosen SIO/DIO class-driver in SIO_ISSUERECLAIM mode, but I have a problem with it.
At first I've checked my driver in loopback mode (HW loopback with Tx and Rx physically connected) and verified that all sent data are received normally.

Due to loopback mode I haven't checked number of bytes in reclaimed buffers on the first iteration.
Now, when I enabled checking the number of bytes, I've got SYS_ETIMOUT error for the first Rx buffer on every run.
At the same time data in this (Rx) buffer are correct and correspond to sent data!
All other calls to SIO_reclaim return correct buffer size.

I don't change bufsize field of the DEV_Frame structure within IOM mini-driver, so I suppose that it isn't a problem of mini-driver but a problem of IOM to SIO/DIO interaction.
Just to mention: timeout field of DEV_Frame was equal to several seconds, so there was enough time for loopback application to handle them correctly.
In addition I reclaim Rx buffers only after sending data to Tx.

Can anybody having an access to DSP sio/dio source codes check if the first returned buffer may have this issue?

  • I've found it!

    Sorry for disturbing you, it was my error.

    I've encountered the difference between:

        while ( (--chars_to_transfer) && (uart_regs->LSR & CSL_UART_LSR_DR_MASK) )
    and 
        while ( (uart_regs->LSR & CSL_UART_LSR_DR_MASK) && (--chars_to_transfer)) 

    The second case obviously will not reduce characters counter, if the Rx buffer was emptied (LSR bits), which in my case led to not releasing Rx buffer in-time.