Hi All,
Thank you all for the wonderfull OpenOCD.
I have used it with my LPC2468 Embedded Artist board and there flash laoding works like a charm on both internal flash and the external SST 39VF3202 flash.
However now I have run into trouble with a new board holding the SST 39VF6401B external flash.
First of all there was no support for this flash in the non_cfi.c so I added this:
{
.mfr = CFI_MFR_SST,
.id = 0x236d,
/* SST39VF6401B */
.pri_id = 0x02,
.dev_size = 8*MB,
.interface_desc = 0x2, /* x8 or x16 device with BYTE */
.max_buf_write_size = 0x0,
.status_poll_mask = CFI_STATUS_POLL_MASK_DQ6_DQ7,
.num_erase_regions = 1,
.erase_region_info =
{
ERASE_REGION(2048, 4*KB)
}
},
This seems to make me capable of recognizing the flash. So far so good.
Then I added this line to the cfi.c cfi_0002_fixups array:
{CFI_MFR_SST, 0x236d, cfi_fixup_0002_unlock_addresses, &cfi_unlock_addresses[CFI_UNLOCK_555_2AA]},
This I did because it seemed like the proper thing to do based on what I found in flash spec.
All this does not help me very much as I cannot flash anything to this flash, here are my observations:
-
I can get a flash info and then all blocks are in a “protection state unknown” condition. This can be solved by applying a “flash protect_check 1”. Then a “flash info 1” says that every block is protected.
-
I can disable the “working area” and the it seems to flash but very slowly and pretty useless with a 8M flash. This leads me into thinking that chipselect and all these things are OK.
-
The flash I am using is identified to have “CFI Query string” where " Primary OEM command set = 0002H @ address 13H" Whereas the EA board flash that works nicely has a “command set = 01H”.
My OpenOCD 0.3.1 is simply throwing this kind of message after me
non-cfi flash:
mfr: 0x00bf, id:0x236d
Error: timed out while waiting for target halted
Error: error writing to flash at address 0x80000000 at offset 0x00000000 (-902)
So now I am running out of ideas and was hoping for some help for one or more of my questions from you brilliant people inside this forum.
Q1: Does any of the things I did make sence?
Q2: Am I missing some important bit to fully adapt a new flash?
Q3: Does this “command set” difference mean that I am in the same kind of trouble as some of the other people I read abot in this forum are?
Q4: I also read about some patches. Would there be one “hacky unsupported take it or leave it patch” that could safe me on this particular flash? Any reference.
If you can answer any of these questions you are my hero:-)
Thanks Flemming