PXA255 data corruption during flash programming

Hi All,

I’m experiencing a strange issue when I try to flash a large file

(around 17mb).

I’m working on a custom board equipped with a PXA255 and Intel Strataflash, and on different boards I get different results.

Basically I can’t flash data reliably because “verify_image” always fail

at different locations of memory.

So I would like to know if there’s a way to flash small chunks of data (for example 256kb since this is the block size of the flash chips), issue a verify_image and then proceed to the next block in case it’s everything ok.

I’ve tried to lower the jtag speed to 150 KHz (I’m using an Amontec Chameleon POD configured as wiggler) but without luck.

I suspected also that data corruption was caused by a bad SDRAM initialization, but disabling the “work_area” option, it only took much more time (~2 hours) but I didn’t see any improvement.

I’m wondering if these problems are caused by the wiggler (Macraigor flashpgm don’t give me any issue but it’s very slow).

Thanks in advance.

Well it looks like I’ve found the source of my problem.

By launching:

“flash erase_address unlock 0x0 0x2000000”

and

“flash erase_check 0”

some sectors are not erased properly.

The flash chips on my board are “28F128J3(A)”.

Solved with this “for loop”:

for {set x 0} {$x<0x2000000} {set x [expr {$x + 0x40000}]} {

flash erase_address unlock $x 0x40000

}