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-Q1: AM2634 Flash Programming Issue

Part Number: AM2634-Q1
Other Parts Discussed in Thread: UNIFLASH

Hi

   Customer meet problem when use python script to program flash. They use customized flash on LP-AM263x.  They always get failure if image size is larger than 320KB. I checked sbl_uar_uniflash project, the buffer to receive file is much larger than 320KB. as

#define BOOTLOADER_UNIFLASH_MAX_FILE_SIZE (0x1C0000) 

From the log provided by customer, it looks like device fail to receive application images.

Can you please help to exam the messages from python script? 

   

Q1. is there anyway/document we can use CCS to debug sbl_uart_uniflash so we can get more clear insight of the issue?

Q2. What will make xmodem transaction fail? Anyway to make python script to provide more information to help debug?

Regards

Andre 

  • More input:

         I can reproduce this issue on EVM. The issue is not related to customized FLASH driver.  Please refer to attached test image. I modify from GPIO blink project.

    I add a empty table to increase image size larger than 512KB and program it to LP-AM263x EVM.  Modified source code and linker command files are also attached.

    gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang.appimage

    gpio_led_blink.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    /*
    * 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.
    *
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    2148.linker.cmd

    I tested several time and got the same error symptom.  I also add GPIO indication in sbl_uart_uniflash. 

    test.log
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    (mcu+) andre@elevation:~/ti/mcu_plus_sdk_am263x_08_05_00_24/tools/boot$ python uart_uniflash.py -p /dev/ttyACM0 --cfg=/home/andre/ti/mcu_plus_sdk_am263x_08_05_00_24/tools/boot/app_config/gpio_led_blink_r5f0-0_am263x-lp.cfg
    Parsing config file ...
    Parsing config file ... SUCCESS. Found 3 command(s) !!!
    Executing command 1 of 3 ...
    Found flash writer ... sending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang.tiimage
    Sending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_uSending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_uSending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_u Sent flashwriter /home/andre/workspace_v12/sitara_mcu/am263x/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_uart_uniflash_am263x-lp_r5fss0-0_nortos_ti-arm-clang.tiimage of size 68433 bytes in 6.82s.
    Executing command 2 of 3 ...
    Command arguments : --file=/home/andre/workspace_v12/sitara_mcu/am263x/sbl_qspi_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_qspi_am263x-lp_r5fss0-0_nortos_ti-arm-clang.tiimage --operation=flash --flash-offset=0x0
    Sending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_qspi_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_qspi_am263Sending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_qspi_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_qspi_am263Sending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_qspi_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_qspi_am263Sending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_qspi_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_qspi_am263Sending /home/andre/workspace_v12/sitara_mcu/am263x/sbl_qspi_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_qspi_am263 Sent /home/andre/workspace_v12/sitara_mcu/am263x/sbl_qspi_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/sbl_qspi_am263x-lp_r5fss0-0_nortos_ti-arm-clang.tiimage of size 187249 bytes in 18.62s.
    [STATUS] SUCCESS !!!
    Executing command 3 of 3 ...
    Command arguments : --file=/home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang.appimage --operation=flash --flash-offset=0x80000
    Sending /home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_ledSending /home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_ledSending /home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_ledSending /home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_ledSending /home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_ledSending /home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_ledSending /home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang.appimage: 566981bytes [00:54, 11087.89bytes/s]recv error: getc timeout in start sequence
    Sending /home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_ledSending /home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_ledSending /home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_ledSending /home/andre/workspace_v12/sitara_mcu/am263x/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang/Debug/gpio_led_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang.appimage: 566983bytes [01:08, 294.71bytes/s]expected sequence 2, got (seq1=1, seq2=1), receiving next block, will NAK.
    recv error: purge, requesting retransmission (NAK)
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Can you please check if there is any issue in SBL_UART_UNIFLASH or python script?

    Regards

    Andre

  • The programming problem already impact customer schedule,  any update?

    Regards

    Andre

  • Hi ,

    Are there any changes done by user in the SBL UNIFLASH example ?

    Q1. is there anyway/document we can use CCS to debug sbl_uart_uniflash so we can get more clear insight of the issue?

    This FAQ tells how to debug SBL -

    https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1119575/faq-mcu-plus-sdk-am243x-how-to-debug-sbl_qspi-for-am263-and-am273-or-sbl_ospi-for-am243-or-an-application-which-is-booted-via-ospi-qspi-boot

    Q2. What will make xmodem transaction fail? Anyway to make python script to provide more information to help debug?

    Unfortunately it is completely being functional on the target, there is no use in debugging the python.

    The programming problem already impact customer schedule,  any update?

    Can you try using JTAG Uniflash option to unblock the customer ?

    Best Regards,
    Aakash

  • Aakash,

        

    Are there any changes done by user in the SBL UNIFLASH example ?

    ==> I can reproduce on LP-AM263x with pre-built flash programmer, SDK8.5 TI shipped pre-built image, TI utility without any modification. Then only thing different is application image larger than 500KB.  Try it on LP-AM263x, I have provide code, application image. It won't take you more than 5minutes to reproduce this issue.

    Can you try using JTAG Uniflash option to unblock the customer ?

     ==> No. there is no JTAG interface in customer design.

    Regards

    Andre

  • With CCSDebug: 

    sbl_uart_uniflash fail at the last step. 

           status = Bootloader_xmodemTransmit(CONFIG_UART0, (uint8_t *)&respHeader, sizeof(Bootloader_UniflashResponseHeader));

    Bootloader_xmodemTransmit() doesn't transmit data.

    The respHeader parameters of Bootloader_xmodemTransmit() is captured as:

    Field team doesn't know the detail of uniflash communication protocol. Please check and provide solution. Customer is waiting for response.

    Regards

    Andre

      

  • Hi ,

    I have replicated the issue. I have raised an internal ticket for the same (https://jira.itg.ti.com/browse/MCUSDK-9890). This link might not be accessible outside TI network.

    For certain images (approx. 550KB), I tried increasing the timeout number - 

    in uart_uniflash.py of xmodem_send_receive_file function. It worked for me. The actual fix will be done by in 08.06 release itself.

    Also, I tested, even with this error, the image was correctly flashed so I request you to try the application boot in QSPI boot mode. But I agree, it should've ended gracefully which it isn't.

    Hope it helps.

    Best Regards,
    Aakash

  • Aakash,

     Confirm adding timeout value uart_python.py solve the problem. You can close this issue now. Thanks for your help.

    Regards

    Andre