# # Guardian Flash programming example for 440SP Luan2 # # play ppc_440sp_luan2_flash.def # # #guard_on # # make sure a TLB exists for FLASH # make sure a TLB exists for RAM # this will take several seconds @play ppc_440sp_luan2.def # set up flash parameters opt wsaddr 0x00010000 # workspace address(in L2-SRAM) opt wssize 0x2000 # workspace size opt fltout 0x1e # timeout for flash operations opt fltype AMD29F # flash type/algorithm opt flssize 0x10000 # size of a sector opt flnsec 0x8 # number of sectors(if not specified in the command) opt flwidth 8 # flash with is 8 bits opt flswap off # no swap # turn workspace on and set up a large tftp buffer space(for speed) opt flwork on # turn workspace on opt tbufsiz 32 # if for some reason, workspace is not available, # turn off workspace, and reduce the tftp buffer size(to prevent timeouts) #opt flwork off # turn workspace off #opt tbufsiz 2 # if we can ID the parts, we should be able to program and erase opt flbase 0xfff00000 opt fltout 0x2;fl -id 0xFFF00000 opt flbase 0xfff80000 opt fltout 0x2;fl -id 0xFFF80000 kill # erase the 8 sectors in each part opt flbase 0xfff00000 fl -es 0xFFF00000 0x8 opt flbase 0xfff80000 fl -es 0xFFF80000 0x8 wait 100 opt fltout 0x10 # timeout for flash operations #@play ppc_440sp_luan2.def # set the base address for the low pibs image opt flbase 0xFFF00000 # program the low pibs image fl -p pibs_luan2_low.bin 0xFFF00000 -BIN wait 100 # set the base address for the high pibs image opt flbase 0xFFF80000 # program the high pibs image fl -p pibs_luan2_high.bin 0xFFF80000 -BIN #opt clk 1 # try slowing clock if you have reset problems reset #guardoff