Flash write strange behaviour?

Jun 08, 2009 4 Replies

To All,



Not sure this is the correct group, but anyway. Trying to write to a Flash (atmel at49bv162at 2MB) with openocd.



What I do is: mwb 0x10000000 0xF0 # clear cmd mwb 0x10000555 0xAA # enter cmd mode mwb 0x10000AAA 0x55 # enter cmd mode mwb 0x10000555 0xA0 # command: write



mwb 0x10000000 0xEE # now, write 0xEE to address 0 mdb 0x10000000 #show address 0



RESULT: 0x10000000: 0xff



I even can't enter the product identification mode (0xaa to 0x555, 0x55 to



0xaaa, 0x90 to 0x555) to read vendor and model info. However, I can read data from the flash and also openocd with it's internal driver can get the "cfi" information.

Thanks for your help!



(cmd list I found in the datasheet for the flash memory)


vp escribió:

Don't know what "cfi" is.

Is the WR line properly wired?

do you unprotect the flash sectors before erasing/writing?

Bye Jack

PS: usually reading the datasheet helps.

It is.

o
e

It's 16-bit chip. The least-significant bit of the address has no bearing. See if the following enables product ID mode (based on endianness):

mwh 0x10000AAA 0x00AA # 0xAA00 for little-endian mwh 0x10001554 0x0055 # 0x5500 for little-endian mwh 0x10000AAA 0x0090 # 0x9000 for little-endian

to

d

the

Common Flash Interface. A standard method to determine the device's=20 geometry.

--Gene

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required