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.

SK-AM62A-LP: Erase Flash region

Part Number: SK-AM62A-LP
Other Parts Discussed in Thread: UNIFLASH

Tool/software:

Hi,

I'm able to flash Stage1, Stage2, DM R5 core sample application and MCU R5 core sample application via Uart Ospi Nand Linux Multistage cfg option.

As per the below Flash Layout, I can see my sample applications are running.

If I want to erase the specific Application region of DM/MCU R5 range, what procedure I have to follow? (ie) To clear the region 0xC0000 to 0x240000 and 0x800000 to 0xA00000.

I tried "--operation=erase" via uart_uniflash.py and it seems not working. Please advise me.

$ python uart_uniflash.py -p COM3 --operation=erase --flash-offset=0xC0000 --erase-size=0x100000
Sending erase_command: 1046bytes [00:04, 508.26bytes/s]error_count reached 16, aborting.
Sending erase_command: 1048bytes [00:04, 508.26bytes/s]
[ERROR] XMODEM recv failed, no response OR incorrect response from EVM OR cancelled by user,
Power cycle EVM and run this script again !!!

Regards,

Raje

  • Hi,

    The UART_UNIFLASH images must be booted first for any operation.

    Attached are the logs for erasing the flash at a certain offset for a given size.

    ❯ cat erase.cfg
                                                                                                                                                                                                
    # First point to sbl_uart_uniflash_stage1 binary, which initialises DDR and receives sbl_uart_uniflash_stage2 binary
    --flash-writer=sbl_prebuilt/am62ax-sk/sbl_uart_uniflash_stage1.release.tiimage
                                                                                                                                                                                                
    # Points to sbl_uart_uniflash_stage2 binary, which function's as a server to flash one or more
    # Please note this binary is copied to DDR by sbl_uart_uniflash_stage1 and not written to any boot media like flash or eMMC
    --file=../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage --operation=flash
    --flash-offset=0x0
                                                                                                                                                                                                
    --operation=erase --flash-offset=0xC0000 --erase-size=0x100000
                                                                                                                                                                                                
    ❯ python uart_uniflash.py -p COM46 --cfg erase.cfg
                                                                                                                                                                                                
    Parsing config file ...
    Parsing config file ... SUCCESS. Found 3 command(s) !!!
                                                                                                                                                                                                
    Executing command 1 of 3 ...
    Found flash writer ... sending sbl_prebuilt/am62ax-sk/sbl_uart_uniflash_stage1.release.tiimage
    Sent flashwriter sbl_prebuilt/am62ax-sk/sbl_uart_uniflash_stage1.release.tiimage of size 257330 bytes in 25.92s.
                                                                                                                                                                                                
    Executing command 2 of 3 ...
    Command arguments : --file=../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimag
    e --operation=flash --flash-offset=0x0
    Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage: 130683bytes [00:
    Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage: 130683bytes [00:
    Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage: 130684bytes [00:
    Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage: 130685bytes [00:
    Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage: 130686bytes [00:
    Sending ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage: 130687bytes [00:
                                                                                                                                                                                                
    Sent ../../examples/drivers/boot/sbl_uart_uniflash_multistage/sbl_uart_uniflash_stage2/am62ax-sk/r5fss0-0_nortos/ti-arm-clang/sbl_uart_uniflash_stage2.release.appimage of size 129836 bytes
     in 15.57s.
    [STATUS] SUCCESS !!!
                                                                                                                                                                                                
    Executing command 3 of 3 ...
    Command arguments : --operation=erase --flash-offset=0xC0000 --erase-size=0x100000
    Sent flash erase command.
    [STATUS] SUCCESS !!!
                                                                                                                                                                                                
    All commands from config file are executed !!!

    Regards,

    Prashant