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.

LP-AM243: AM243X-EVM - Flash with python

Part Number: LP-AM243
Other Parts Discussed in Thread: UNIFLASH

Hello,

i try to flash the AM243X-EVM board like referred here: Flash SOC Initialization Binary

AM243x MCU+ SDK: EVM Setup (ti.com)

Command line argument:           

py uart_uniflash.py -p COM11 --cfg=sbl_prebuilt/am243x-evm/default_sbl_null.cfg

default_sbl_null.cfg Content:

# First point to sbl_uart_uniflash binary, which function's as a server to flash one or more files
--flash-writer=sbl_prebuilt/am243x-evm/sbl_uart_uniflash.release.tiimage

# When sending bootloader make sure to flash at offset 0x0. ROM expects bootloader at offset 0x0
--file=sbl_prebuilt/am243x-evm/sbl_null.release.tiimage --operation=flash --flash-offset=0x0

Result off execution:

C:\ti\mcu_plus_sdk_am243x_08_01_00_36\tools\boot>py uart_uniflash.py -p COM11 --cfg=sbl_prebuilt/am243x-evm/default_sbl_null.cfg

Parsing config file ...
Parsing config file ... SUCCESS. Found 2 command(s) !!!

Executing command 1 of 2 ...
Found flash writer ... sending sbl_prebuilt/am243x-evm/sbl_uart_uniflash.release.tiimage
Sent flashwriter sbl_prebuilt/am243x-evm/sbl_uart_uniflash.release.tiimage of size 297212 bytes in 34.13s.

Executing command 2 of 2 ...
Command arguments : --file=sbl_prebuilt/am243x-evm/sbl_null.release.tiimage --operation=flash --flash-offset=0x0
Send normally
Sending sbl_prebuilt/am243x-evm/sbl_null.release.tiimage: 1%|▉ | 2058/221724 [00:01<01:36, 2267.16bytes/s]send error: expected ACK; got b'\x18' for block 2
Sending sbl_prebuilt/am243x-evm/sbl_null.release.tiimage: 1%|█▎ | 3087/221724 [00:01<01:03, 3456.27bytes/s]send error: expected ACK; got b'\x18' for block 2
Sending sbl_prebuilt/am243x-evm/sbl_null.release.tiimage: 2%|█▊ | 4116/221724 [00:01<01:02, 3456.27bytes/s]send error: expected ACK; got b'0' for block 2
Sending sbl_prebuilt/am243x-evm/sbl_null.release.tiimage: 2%|██▏ | 5145/221724 [00:01<01:02, 3456.27bytes/s]send error: expected ACK; got b'1' for block 2
Sending sbl_prebuilt/am243x-evm/sbl_null.release.tiimage: 3%|██▋ | 6174/221724 [00:01<00:28, 7671.06bytes/s]send error: expected ACK; got b'0' for block 2
Sending sbl_prebuilt/am243x-evm/sbl_null.release.tiimage: 3%|███ | 7203/221724 [00:01<00:27, 7671.06bytes/s]send error: expected ACK; got b'0' for block 2
Sending sbl_prebuilt/am243x-evm/sbl_null.release.tiimage: 4%|███▌ | 8232/221724 [00:01<00:24, 8568.37bytes/s]send error: expected ACK; got b'0' for block 2
Sending sbl_prebuilt/am243x-evm/sbl_null.release.tiimage: 4%|███▉ | 9261/221724 [00:01<00:24, 8568.37bytes/s]send error: expected ACK; got b'0' for block 2
Sending sbl_prebuilt/am243x-evm/sbl_null.release.tiimage: 5%|████▎ | 10290/221724 [00:01<00:23, 9171.42bytes/s]send error: expected ACK; got b'0' for block 2
Sending sbl_prebuilt/am243x-evm/sbl_null.release.tiimage: 5%|████▊ | 11319/221724 [00:01<00:22, 9171.42bytes/s]send error: expected ACK; got b'0' for block 2
Sending sbl_prebuilt/am243x-evm/sbl_null.release.tiimage: 6%|█████▏ | 12348/221724 [00:01<00:21, 9560.95bytes/s]send error: expected ACK; got b'0' for block 2
send error: NAK received 11 times, aborting.
Sending sbl_prebuilt/am243x-evm/sbl_null.release.tiimage: 6%|█████▏ | 12350/221724 [00:02<00:21, 9560.95bytes/s]
[ERROR] XMODEM send failed, no response OR incorrect response from EVM OR cancelled by user,
Power cycle EVM and run this script again !!!

I tried this with different options, but always in combination with xmodem the script is not running.

Is it possible that xmodem not works because of the characters are sent from the AM243X-EMV?

The ASCII symbols are the same as shown in the terminal after a reset

CCþ01000000011a0000616d36347800000000000000475020200000010000000100CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC01000000011a0000616d36347800000000000000475020200000010000000100CCCCCCCCCCCCCCCCCCCCC01000000011a0000616d36347800000000000000475020200000010000000100CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC01000000011a0000616d36347800000000000000475020200000010000000100CCCCCCCCCCCCCCCCCCCCC01000000011a0000616d36347800000000000000475020200000010000000100CCCCCCCC

Kind Regards,

Steffen

  • Hi Steffen,

    While you run the the script, did you close the COM11 terminal? If not, that is the cause. The COM11 terminal will conflict with the xmodem transfer since they are using the same COM11 port. As it is sated in AM243x MCU+ SDK: EVM Setup (ti.com):

    • Close the UART terminal as shown below. This is important, else the UART script in next step wont be able to connect to the UART port.

    Close UART terminal
    Best regards,
    Ming
  • Hi Ming,

    thank you for your answer.

    yes, the COM11 Terminal is closed during run the script.

    The first command of the python script is successfull:

    Executing command 1 of 2 ...
    Found flash writer ... sending sbl_prebuilt/am243x-evm/sbl_uart_uniflash.release.tiimage
    Sent flashwriter sbl_prebuilt/am243x-evm/sbl_uart_uniflash.release.tiimage of size 297212 bytes in 34.13s.

    But transfers with xmodemx are not working. During this transfer, the xmodem lib says invalid characters are received. For example ASCII character '1' received:

    Sending sbl_prebuilt/am243x-evm/sbl_null.release.tiimage: 2%|██▏ | 5145/221724 [00:01<01:02, 3456.27bytes/s]send error: expected ACK; got b'1' for block 2

    Kind Regards,

    Steffen

  • Hi Steffen,

    I just did the same script on the AM243x EVM using the MCU+ SDK 08.01.00.36 for AM243x. The first time it failed with the same error you reported. The second time it worked properly. The difference is that I opened then closed the terminal emulator in the first time. The second time, I closed the terminal emulator, then power cycle the EVM, then run the script. Can you try this sequence on your side.

    If it still not working, can you try the SBL from SD card?  section "SOC Initialization Using SD BOOT" of AM243x MCU+ SDK: EVM Setup (ti.com) with the included microSD card? It will at least get you through the "SOC initialization"

    Best regards,

    Ming