导航

AT91 SAM_BA related information

Posted on 2011-11-29 13:33  cornflower  阅读(431)  评论(0编辑  收藏  举报

1.Boot Program Algorithm flow Chart.(you can get this picture from 9260 datasheet in section 13.2)

    • initial Oscillaotor for CLK
    • Check if system can boot from SPI data Flash in NPCS0
    • CHeck if system can boot from SPI data flash in NPCS1
    • Chcek if system can boot from NAND Flash
    • if we can’t find any boot image.system will trap to SAM-BA boot mode

So now,question come. it’s should be a bug.

image

 

suppose, we check NAND Flash Boot ==yes, we try to Download from NAND Flash and then to run.but unfortunately,if your image have some defect in uboot,and can’t get to uboot command line.what will be happed?

you can’t ent SAM-BA boot any more.no matter what you try.

So how to for this?

There are three ways to solve the problem:
• Connect a DataFlash card containing a small application that erases the Flash
correctly.
• Erase the Flash using a JTAG device.
• Remove resistors to disable the DataFlash and NAND Flash chip selects. To prevent an incorrect image from being programmed into the Flash memory, it is highly recommended to use the AT91Bootstrap application to setup the system after power up cycle. This application integrates a recovery procedure activated when BP4 button is pressed.

但是如果你没有焊接BP4呢?you can Loading AT91bootstrap-recovery in SRAM Using an ICE Interface.

but where the  

AT91bootstrap-recovery bin?

 you can build it by yourself.

#vi at91sam9260ek.c

in function static void nand_recovery(void) mark 

if (!pio_get_value(AT91C_PIN_PA(31)) ) 

this means we will erase block0 no matter what. 

 

 now.you can make and download this special bootstarp to board and go.

#run jlink.exe

in jlink command line:

# loadbin C:\LDiskD\share\nandflash_at91sam9260ek.bin 0x200000

#SetPC 0x200000

#g

 after a short while, then power up the board, you can enter SAM-BA model again .