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.

AM2634: UART blocking sdk 10.1 not working propperly

Part Number: AM2634

Tool/software:

Hi

The UART driver from sdk10.1 does not works well with XMODEM (from the drivers/bootloader), it worked ok in the sdk9.2 version. UART is in blocking mode.

What happens is that XMODEM frequently losing bytes so it is going into retry and in most of the cases I can't send a 300k firmware over it.

Anyone having the same issue? Any solutions for it?

Did a cross check: moved the 10.1 UART driver into SDK9.2 (the abstraction layer is compatible) and the error moves with the driver so it is something related to the driver - have seen it was heavily modified from sdk 9.2.0.56 I was using until now.

Best regards,

Barna Csenteri

  • Hi Barna,

    I have looped in our software expert for insight on differences between the UART drivers in SDK 10.1 and 9.2. Please expect a reply tomorrow.

    Regards,

    Brennan

  • Hi

    Ok. I waiting for a feedback.

    I would also like to know how to use UART correctly: what I need is an intermediary buffer with a given size (like 150 for example to accommodate a 128+header XMODEM frame) which is filled up on the maximum speed by interrupt. UART peripheral FIFO is 64 byte so it is needed to take that data fast enough to avoid overflow on reception and than I can read the data with a process with slower speed if needed. Since XMODEM is with handshake 1 frame is sent with higher speed but there are no other frames after until the handshake is done. 

    I did checked the older 9.2.0.56 driver and the interrupt/blocking version does not do this kind of intermediary buffer, it does uses directly the FIFO of the UART peripheral. 

       uart_v0.c/UART_read
       if (UART_CONFIG_MODE_INTERRUPT == prms->transferMode)
           UART_lld_readIntr
           UART_readInterrupt
           UART_readData
           UART_getChar
             HW_RD_REG32(baseAddr + UART_LCR);
             .....

    I am not sure about the 10.1 version since I could not make that working until now but this might be the issue with the 10.2 driver too - the XMODEM frame is longer than 64 byte of the UART FIFO.

    However it did worked with 9.2 driver if the process doing the XMODEM receive was fast enough while on 10.2 it does not - looses data somewhere.

    Best regards,
    Barna Csenteri