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.

MCU-PLUS-SDK-AM243X: How do we recognize the potential failure described in Eratta i2310

Part Number: MCU-PLUS-SDK-AM243X
Other Parts Discussed in Thread: UNIFLASH

Tool/software:

Please reference TI Errata i2310 for this issue.

TI has told us that UART programming for AM243x is not recommended because of small failure rates (~0.14%), we should be using USB programming instead. We do not do use USB for the product in question because our board does not have a USB port.

What we don’t know is how do we identify the issue. We want to categorize this failure vs another issue (bad chip, bad part placement, bad board, bad cable, …) We don’t expect TI to identify these other failure types, what we would like is to have a definitive way to identify the i2310 failures.

If our failures is “send error: expected ACK; got None for block 1” or “[ERROR] XMODEM send failed, no response OR incorrect response from EVM” is that the what we should look for or is there another symptom not shown below? Could we expect or not expect to `CCC` on the URT for this failure - we have seen both cases and sometimes it is intermittent.

In each of the cases below we have attempted to re-provision these boards. When a board fails it is taken off the fixture and later retried multiple times (~ 10 times) before we fail the board.

These are all examples from failure logs:

14:09:33 523 [INFO] Results of script:
send error: expected ACK; got None for block 1
send error: expected ACK; got None for block 1
send error: expected ACK; got None for block 1
send error: expected ACK; got None for block 1
send error: expected ACK; got None for block 1
send error: expected ACK; got None for block 1
send error: expected ACK; got None for block 1
send error: expected ACK; got None for block 1
send error: expected ACK; got None for block 1
send error: expected ACK; got None for block 1
send error: expected ACK; got None for block 1
send error: NAK received 11 times, aborting.
 
Parsing config file ...
Parsing config file ... SUCCESS. Found 3 command(s) !!!
 
Executing command 1 of 3 ...
Found flash writer ... sending /root/calamari/tests/resources/sbl_uart_uniflash_0805_v3.hs_fs.tiimage
 
[ERROR] XMODEM send failed, no response OR incorrect response from EVM OR cancelled by user,

17:32:32 049 [INFO] Results of script:
send error: error_count reached 10, aborting.
 
Parsing config file ...
Parsing config file ... SUCCESS. Found 3 command(s) !!!
 
Executing command 1 of 3 ...
Found flash writer ... sending /root/calamari/tests/resources/sbl_uart_uniflash_0805_v3.hs_fs.tiimage
 
[ERROR] XMODEM send failed, no response OR incorrect response from EVM OR cancelled by user,
Power cycle EVM and run this script again !!!
 
17:32:32 050 [INFO] Script end (/root/calamari/calamari/am243x) ----------------------------------------
 
17:32:32 054 [DEBUG] closing client connection.  exiting passthroughs, releasing pdi mux, turning off leds.
17:32:32 054 [DEBUG] <><> conn.read util:try_func:108, client:close:88, connection:read:155
17:32:32 059 [DEBUG] Read finished - 0.005 sec

10:40:29 309 [INFO] Results of script:
send error: expected ACK; got None for block 2
send error: expected ACK; got None for block 2
send error: expected ACK; got None for block 2
send error: expected ACK; got None for block 2
send error: expected ACK; got None for block 2
send error: expected ACK; got None for block 2
send error: expected ACK; got None for block 2
send error: expected ACK; got None for block 2
send error: expected ACK; got None for block 2
send error: expected ACK; got None for block 2
send error: expected ACK; got None for block 2
send error: NAK received 11 times, aborting.
 
Parsing config file ...
Parsing config file ... SUCCESS. Found 3 command(s) !!!
 
Executing command 1 of 3 ...
Found flash writer ... sending /root/calamari/tests/resources/sbl_uart_uniflash_0805_v3.hs_fs.tiimage
 
[ERROR] XMODEM send failed, no response OR incorrect response from EVM OR cancelled by user,
Power cycle EVM and run this script again !!!

15:15:32 623 [INFO] Results of script:
received CAN
received CAN
 
Parsing config file ...
Parsing config file ... SUCCESS. Found 3 command(s) !!!
 
Executing command 1 of 3 ...
Found flash writer ... sending /root/calamari/tests/resources/sbl_uart_uniflash_0805_v3.hs_fs.tiimage
Sent flashwriter /root/calamari/tests/resources/sbl_uart_uniflash_0805_v3.hs_fs.tiimage of size 317108 bytes in 32.32s.
 
Executing command 2 of 3 ...
Command arguments : --file="/root/calamari/tests/resources/bootloader_am243.Debug.hs_fs.tiimage" --operation=flash --flash-offset=0x0
 
[ERROR] XMODEM send failed, no response OR incorrect response from EVM OR cancelled by user,
Power cycle EVM and run this script again !!!
 
15:15:32 623 [INFO] Script end (/root/calamari/calamari/am243x) ----------------------------------------
 
15:15:32 624 [DEBUG] closing client connection.  exiting passthroughs, releasing pdi mux, turning off leds.
15:15:32 624 [DEBUG] <><> conn.read util:try_func:108, client:close:88, connection:read:155
15:15:32 630 [DEBUG] Read finished - 0.005 sec
15:15:32 630 [DEBUG] <<< b'\x18'

  • Hi Mark,

    The assigned is expert is out of office today. Responses to this thread will be delayed. Thanks for your cooperation.

    Regards,

    Tushar

  • Hi Tushar,

    Any update?

    Thanks, Merril

  • Hi,

    Thanks for your patience.

    I have tracked the owner for the commit for i2310 which can be seen now in the MCU PLUS SDK under drivers/uart.

    I will discuss and let you know once I have updates.

    Regards,

    Vaibhav

  • Hi,

    I would need more time to comment my thoughts on this.

    Regards,

    Vaibhav

  • Hi Vaibhav,

    Any update?

    Thanks, Merril

  • Hi Newman,

    I am trying to reproduce this issue on the AM243-LP TI EVM.

    The goal here is as follows.

    UART_i2310WA is called inside controllerISR function. This gets called whenever UART read and UART write APIs are called.
     
    So, I am running a simple application where I do bunch of writes and reads until I hit the breakpoint at UART_i2310WA or encounter some error.
    Regards,
    Vaibhav
  • Please check my test application. Note, I have put a breakpoint at the API UART_i2310WA to see if it hits that and hence I can draw some conclusion from it.

    /*
     *  Copyright (C) 2021 Texas Instruments Incorporated
     *
     *  Redistribution and use in source and binary forms, with or without
     *  modification, are permitted provided that the following conditions
     *  are met:
     *
     *    Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     *    Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the
     *    distribution.
     *
     *    Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */
    
    /* This example demonstrates the UART RX and TX operation by echoing char
     * that it recieves in blocking, interrupt mode of operation.
     * When user types 'quit', the application ends.
     */
    
    #include <string.h>
    #include <kernel/dpl/DebugP.h>
    #include "ti_drivers_config.h"
    #include "ti_drivers_open_close.h"
    #include "ti_board_open_close.h"
    
    #define APP_UART_BUFSIZE              (200U)
    #define APP_UART_RECEIVE_BUFSIZE      (8U)
    
    uint8_t gUartBuffer[APP_UART_BUFSIZE];
    uint8_t gUartReceiveBuffer[APP_UART_RECEIVE_BUFSIZE];
    volatile uint32_t gNumBytesRead = 0U, gNumBytesWritten = 0U;
    
    #define APP_UART_ASSERT_ON_FAILURE(transferOK, transaction) \
        do { \
            if((SystemP_SUCCESS != (transferOK)) || (UART_TRANSFER_STATUS_SUCCESS != transaction.status)) \
            { \
                DebugP_assert(FALSE); /* UART TX/RX failed!! */ \
            } \
        } while(0) \
    
    void uart_echo(void *args)
    {
        int32_t          transferOK;
        UART_Transaction trans;
    
        Drivers_open();
        Board_driversOpen();
    
        DebugP_log("[UART] Echo example started ...\r\n");
    
        uint32_t tries = 1000;
        while(tries > 0)
        {
            tries--;
            UART_Transaction_init(&trans);
    
            /* Send entry string */
            gNumBytesWritten = 0U;
            trans.buf   = &gUartBuffer[0U];
            strncpy(trans.buf,"This is uart echo test blocking mode\r\nReceives 8 characters then echo's back. Please input..\r\n", APP_UART_BUFSIZE);
            trans.count = strlen(trans.buf);
            transferOK = UART_write(gUartHandle[CONFIG_UART_CONSOLE], &trans);
            APP_UART_ASSERT_ON_FAILURE(transferOK, trans);
    
            /* Read 8 chars */
            gNumBytesRead = 0U;
            trans.buf   = &gUartReceiveBuffer[0U];
            trans.count = APP_UART_RECEIVE_BUFSIZE;
    
            for(int i = 0; i < 8; i++) gUartReceiveBuffer[i] = 97 + i;
    
    //        transferOK = UART_read(gUartHandle[CONFIG_UART_CONSOLE], &trans);
    //        APP_UART_ASSERT_ON_FAILURE(transferOK, trans);
    
            /* Echo chars entered */
            gNumBytesWritten = 0U;
            trans.buf   = &gUartReceiveBuffer[0U];
            trans.count = APP_UART_RECEIVE_BUFSIZE;
            transferOK = UART_write(gUartHandle[CONFIG_UART_CONSOLE], &trans);
            APP_UART_ASSERT_ON_FAILURE(transferOK, trans);
    
            /* Send exit string */
            gNumBytesWritten = 0U;
            trans.buf   = &gUartBuffer[0U];
            strncpy(trans.buf, "\r\nAll tests have passed!!\r\n", APP_UART_BUFSIZE);
            trans.count = strlen(trans.buf);
            transferOK = UART_write(gUartHandle[CONFIG_UART_CONSOLE], &trans);
            APP_UART_ASSERT_ON_FAILURE(transferOK, trans);
    
            DebugP_log("All tests have passed!!\r\n");
        }
    
        Board_driversClose();
        Drivers_close();
    
        return;
    }
    

    Regards,

    Vaibhav

  • I have looked through the code and putting out few things that I have narrowed down.

    There is a register named UART_IIR_UART

    This will tell us about the Interrupt type or more formally the type of interrupt which is currently generated.

    Just focus on the yellow highlighted section. 

    If the value read from the UART_IIR register is 1100b, then this means, the Interrupt is RX Timeout READ 6h.

    If this occurs, then we check if there is minimum 1 byte to be read:

    1. If NO bytes to be read, we are good to go ahead.
    2. If YES, then we come across the errata i2310

  • Hi Newman,

    I have tested a whole bunch of times, but unable to reproduce this issue.

    I wrote a python script to send data to UART and automate this process where UART read API will be called 10000 number of times and each time we send 8 characters via the python script.

    I would say a hacky way to know if this errata has been encountered and isolate this error from any other error is by checking the bit 6 of the UART_EFR2 register. This way if the bit 6, whenever it gets set to 1, we know for a fact that the i2310 errata has hit. 

    Please also note, this can be paired as follows:

    So when the UART_IIR_UART register is set to a value of 1100b and the UART_EFR2 bit 6 is set to 1, the errata i2310 is encountered, else not.

    I have checked in the SDK, we do not write to EFR2 register anywhere, but only in the i2310 errata API.

    Could you try to move ahead with this logic?

    FYI, here is my python script.

    import serial
    import time
    
    # Configure the serial port
    COM_PORT = "COM8"  # Change this to your actual COM port
    BAUD_RATE = 115200  # Adjust according to your setup
    
    # Open the serial port
    ser = serial.Serial(COM_PORT, BAUD_RATE, timeout=1)
    # Wait for the port to initialize
    time.sleep(2)
    
    tries = 1000
    while(tries):
        tries -= 1
    
        # Data to send (8 characters)
        data = "abcdefgh"
    
        # Send data
        ser.write(data.encode())
    
        print(f"Sent: {data}")
        time.sleep(1)
    
    # Close the port
    ser.close() 

    And here is the test code:

    uart_echo_am243x-lp_r5fss0-0_nortos_ti-arm-clang.zip

    Regards,

    Vaibhav

  • Hello Vaibhav, 

    We don't have an easy way to read the UART_EFR2 register, given that our production FW doesn't have a direct print for this register. 

    Given this is a known errata on TI side, based on the script log above, can you help to confirm whether they are all due to this UART boot Errata?   


    Thanks, 
    Hong 

  • Hi Hong,

    Given this is a known errata on TI side, based on the script log above, can you help to confirm whether they are all due to this UART boot Errata? 

    I understand that this is a known errata, but currently it is hard to say when this is reproduced based off the logs.

    Earlier, our test team has tested this by booting via Primary UART Bootmode over several cycles. They had a faulty sample, and hence they were able to reproduce this via ROM booting over primary uart bootmode.

    But it was just that when it failed to boot, they concluded that as a failure due to the errata i2310 and proposed a fix for it.

    I am not sure how this can translate to logs given you are doing UART Uniflash.

    Please let me know if this helps you upto some extent: https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/10_01_00_32/exports/docs/api_guide_am243x/TOOLS_FLASH.html#TOOLS_FLASH_ERROR_MESSAGES

    Regards,

    Vaibhav