Post Go back to editing

Has anyone been able to flash multiple boot sector blocks?

The Problem:

When flashing the first 4 blocks of the Flash memory, the boot sector, I get a ORing activity like flashing any one of the first 4 blocks, the software erases all 4 blocks before writing the desired block.

Example, when flash programming the blocks sequentially, flashing the 2nd block erases the 1st or flashing the 3rd block, erases 1,2, & 4.

Background:

Using BFin-JTag program, I can flash multiple data blocks of the M29W160ET flash memory attached to a ADSP-BF536 without erasing the other blocks with the gnICE+ JTAG programmer.

Using detectflash, I see 4 regions. the first 3 regions are the boot sector according to the Flash Memory Specification sheet.

The 4th region contains 31 64K data blocks, all separately programmable.

The regions shown by the detectflash tell me it is a EB type memory but the label on the memory chip is ET,(concerned but excepting).

I basically followed this analog devices gnICE+ programming webpage.

hw:jtag:gnice [Analog Devices Open Source| Mixed-signal and Digital Signal Processing ICs]

There is a command called "Erase Suspend" in the memory chip document but I have not been able to implement it using the Blackfin LDR-Utils of the GNU Toolchain.

There must be a way to flash the memory blocks without erasing the other memory blocks.

I tried locking the flashed blocks but the flashmem command unlocks them and erases the other blocks anyway.

I know it can be done because the CrossCore and VisualDSP+ IDEs can program the entire flash memory.

I modified the Flashmemory example to use on the BF536 vs the BF537 and M29W160ET vs M29W320ET.

I can then use the IDE to flash the entire memory including the boot sectors.

I:\Work\Data>bfin-jtag

UrJTAG 0.10 #

Copyright (C) 2002, 2003 ETC s.r.o.

Copyright (C) 2007, 2008, 2009 Kolja Waschk and the respective authors

UrJTAG is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

There is absolutely no warranty for UrJTAG.

warning: UrJTAG may damage your hardware!

Type "quit" to exit, "help" for help.

jtag> cable gnICE+

Connected to libftdi driver.

jtag> detect

IR length: 5

Chain length: 1

Device Id: 00110010011111001000000011001011 (0x327C80CB)

  Manufacturer: Analog Devices, Inc. (0x0CB)

  Part(0):      BF537 (0x27C8)

  Stepping:     3

  Filename:     c:\program files (x86)\analog devices\gnu toolchain\2014r1\elf\b

in\../share/urjtag/analog/bf537/bf537

jtag> initbus BF53x

jtag> detectflash 0x20000000

Query identification string:

        Primary Algorithm Command Set and Control Interface ID Code: 0x0002 (AMD/Fujitsu Standard Command Set)

        Alternate Algorithm Command Set and Control Interface ID Code: 0x0000 (null)

Query system interface information:

        Vcc Logic Supply Minimum Write/Erase or Write voltage: 2700 mV

        Vcc Logic Supply Maximum Write/Erase or Write voltage: 3600 mV

        Vpp [Programming] Supply Minimum Write/Erase voltage: 0 mV

        Vpp [Programming] Supply Maximum Write/Erase voltage: 0 mV

        Typical timeout per single byte/word program: 16 us

        Typical timeout for maximum-size multi-byte program: 0 us

        Typical timeout per individual block erase: 1024 ms

        Typical timeout for full chip erase: 0 ms

        Maximum timeout for byte/word program: 256 us

        Maximum timeout for multi-byte program: 0 us

        Maximum timeout per individual block erase: 8192 ms

        Maximum timeout for chip erase: 0 ms

Device geometry definition:

        Device Size: 2097152 B (2048 KiB, 2 MiB)

        Flash Device Interface Code description: 0x0002 (x8/x16)

        Maximum number of bytes in multi-byte program: 1

        Number of Erase Block Regions within device: 4

        Erase Block Region Information:

                Region 0:

                        Erase Block Size: 16384 B (16 KiB)

                        Number of Erase Blocks: 1

                Region 1:

                        Erase Block Size: 8192 B (8 KiB)

                        Number of Erase Blocks: 2

                Region 2:

                        Erase Block Size: 32768 B (32 KiB)

                        Number of Erase Blocks: 1

                Region 3:

                        Erase Block Size: 65536 B (64 KiB)

                        Number of Erase Blocks: 31

Primary Vendor-Specific Extended Query:

        Major version number: 1

        Minor version number: 0

        Address Sensitive Unlock: Required

        Erase Suspend: Read/write

        Sector Protect: 1 sectors per group

        Sector Temporary Unprotect: Not supported

        Sector Protect/Unprotect Scheme: 29BDS640 mode (Software Command Locking)

        Simultaneous Operation: Not supported

        Burst Mode Type: Supported

        Page Mode Type: Not supported

jtag>help

Command list:

frequency    setup JTAG frequency

cable        select JTAG cable

reset        reset JTAG chain

discovery    discovery of unknown parts in the JTAG chain

idcode       Read IDCODEs of all parts in a JTAG chain

detect       detect parts on the JTAG chain

detectflash  detect parameters of flash chips attached to a part

help         display this help

quit         exit and terminate this session

scan         read BSR and show changes since last scan

signal       define new signal for a part

salias       define an alias for a signal

bit          define new BSR bit

register     define new data register for a part

initbus      initialize bus driver for active part

print        display JTAG chain list/status

part         change active part for current JTAG chain

bus          change active bus

instruction  change active instruction for a part or declare new instruction

shift        shift data/instruction registers through JTAG chain

dr           display active data register for a part

get          get external signal value

test         test external signal value

debug        set logging/debugging level

shell        run a shell command

set          set external signal value

endian       set/print endianness

peek         read a single word

poke         write a single word

pod          Set or read state of POD signal(s)

readmem      read content of the memory and write it to file

writemem     write content of file to the memory

flashmem     burn flash memory with data from a file

eraseflash   erase flash memory by number of blocks

lockflash    lock flash memory by number of blocks

unlockflash  unlock flash memory by number of blocks

include      include command sequence from external repository

script       run command sequence from external file

addpart      manually adds parts on the JTAG chain

usleep       Sleep some number of microseconds

bfin         Blackfin specific commands

pld          configure a Programmable Logic Device from file

sdu          SDU specific commands

svf          execute svf commands from file

bsdl         manage BSDL files

Type "help COMMAND" for details about a particular command.

jtag>