;---------------------------------------------------------------------------- ; ; FlashInitDt402Eb.bvc ; ; Command file for flash update on DT402EB ; Boundary scan functions, required: ; bsdl file (LSI402ZX.bsdl) ; image file (Dt402Eb.bin) ; ;---------------------------------------------------------------------------- base x ; set number base to hex JTAG 0 BSDL LSI402ZX.bsdl ; configure boundary scan bmode 1 sample ; set first device in the SAMPLE/PRELOAD mode bscan ; scan all bits bmode 1 extest ; set first device in the EXTEST mode bcopy 1 ; copy scanned in data to the output buffer ; === init definitions for PLD access bmfunction remove ; remove old definitions of the functions bmfunction a 1 addr ; assign all addr bits to the (A)ddr function bmfunction d16 1 data ; assign 16 data bits to the (D)ata function bmfunction w 1 wr0n 0 ; assign active low wr0 strobe to the (W)r function bmfunction r 1 rdn 0 ; assign active low rd strobe to the (R)d function bmfunction c 1 pcs0n 0 ; assign active low pccs0 strobe to the (C)s function bmfunction ; display current bsdl function assignments flashdisplay 0#8 ; show current contents of monitor location bmwrite 4 8 ; disable SRAM CS enable, so we can access flash flashdisplay 0#8 ; show current contents of monitor location ; === init definitions for flash access bmfunction remove ; remove old definitions of the functions bmfunction a 1 addr ; assign all addr bits to the (A)ddr function bmfunction d16 1 data ; assign 16 data bits to the (D)ata function bmfunction w 1 wr0n 0 ; assign active low wr0 strobe to the (W)r function bmfunction r 1 rdn 0 ; assign active low rd strobe to the (R)d function bmfunction c 1 ics0n 0 ; assign active low ics0 strobe to the (C)s function bmreadid ; Read flash id (call procedure) if (v0==0x89) jump microndevice ; we can read device ID, so continue bmreadid3 ; read flash id using triple word accesses if (v0==0x01) jump amddevice ; we can read device ID, so continue if (v0==0x20) jump amddevice ; we can read device ID, so continue if (v0==0xbf) jump amddevice ; we can read device ID, so continue Print "Invalid device found, aborting operation" jump exit ; end command file execution .amddevice print "Found AMD/SST/STM flash, continuing" flashmode 1 ; set flash accesses in AMD/SST/ST mode jump programFlash ; jump back to the programming algorithm .microndevice ; print "Found Micron flash, continuing" flashmode 2 ; assume micron flash .programFlash .exit