Flash programming. Strange behavior

All,

Trying to write to flash atmel at49bv162at

Looks like the solution is simple, but i don’t know what is wrong

To write I do:

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

Please, help

Please, help! The answer is really simple, I bet.

I can’t even get the “cfi” info from the flash (0x98 to 0x55 to enter cfi mode and then read from 0x10 0x11 0x12 to get ‘Q’ ‘R’ ‘I’) – which is the simpliest task. However, openocd when I do “flash probe 0” gets the info.

So: I am doing somthing wrong. The question is: What?

(most likely I write to the wrong address field 0x10000000?)