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-AM62B-P1: EVM have any setting to protect against write operations

Part Number: SK-AM62B-P1

Tool/software:

Hi Expert,

Using the AM62X EVM, under u-boot, executing the following command appears to allow reading, but erase is not possible. Does the EVM have any setting to protect against write operations?

Uboot mode:

=> sf probe

SF: Detected s28hs512t with page size 256 Bytes, erase size 256 KiB, total 64 MiB

 

=> sf read 0x80000000 0x600000 0x2000

device 0 offset 0x600000, size 0x2000

SF: 8192 bytes @ 0x600000 Read: OK

 

=> sf erase 0x600000 0x10000

SF: 65536 bytes @ 0x600000 Erased: ERROR -22

 

Uboot menuconfig settings:

CONFIG_ENV_SIZE=0x20000

CONFIG_ENV_OFFSET=0x600000

CONFIG_ENV_SECT_SIZE=0x10000

0676.config.txt

Thanks

Daniel

  • Hi Daniel,

    Based on the 'sf probe' output the chip reports an erase size of 256 KiB (0x40000 bytes).

    sf erase 0x600000 0x10000 (erasing 64 KiB) failed with ERROR -22 because the requested erase size (0x10000 bytes / 64 KiB) does not match the actual, physical minimum erase block size(256KiB) of the s28hs512t NOR flash chip.

    it will work, if you are specifying a length of 256 KiB, or multiple of the physical erase block size of your s28hs512t NOR flash memory.

    Eg:- sf erase 0x600000 0x40000  

           sf erase 0x600000 0x80000

    Note:-

    The erase will fail if any part of the region to be erased is protected or lies past the end of the flash. It may also fail if the start offset or length are not aligned to an erase region .

  • Hi Dilna

    Thank you for your quick reply. It was indeed an erase size error. The problem has been solved. Thanks for your help.

     

    => saveenv

    Saving Environment to SPIFlash... Erasing SPI flash...Writing to SPI flash...done

    Thanks

    Daniel