If nandflash fails to be written, or the wrong Bootstrap is written, the system cannot be started or connected to Sam-BA by USB, but jlink is not available at hand, you can try to use the SD card startup method to restore the data.
After downloading the attachment and placing it in the root directory of the SD card in FAT32 format, the system starts from the SD card after power-on reset, after entering U-boot, you can use the NAND command to erase the NAND, and then the board can connect to Sam-ba.
The bootstrap code of the Atmel sdcard version is used, and the SD card has a higher startup priority than NAND. For details, refer to the chip data manual.
Start information of the above SD reply file:
For logs in the NAND startup mode, the ID of the NAND is displayed in Bootstrap:
SD card startup priority is higher than Nand
Flash, so no matter whether there are programs on the NAND and whether the code is valid, after inserting the SD card and adding the above files, it will start from the SD card to erase the NAND through uboot.
The startup process is as follows: