On Mon, 2009-06-01 at 17:32 +0200, Raúl Sánchez Siles wrote:
>   Hello:
> 
> On Sunday 31 May 2009 12:58:16 jie.zeng wrote:
> > Hi list,
> >
> > I've got a new problem. When I use the command `flash probe 0' after
> > telnet to the server. It cannot probe the flash.
> >
> > My core is arm926ejs and flash used CFI interface, so go into the code
> > and I found something is not normal.
> >
> > # my flash config
> > flash bank cfi 0x10000000 0x00800000 2 2 0
> 
>   What is the addres at which the flash is located and what is its size?. Do 
> you use a 16bit bus chip/cpu?

The flash's address is 0x10000000 from board datasheet and size is 8Mb.
The width is 16bit.
> >
> > At flash/cfi.c
> > cfi_probe() {
> >
> > /* snip */
> >
> >     /* detect manufacturer ID */
> >     unlock2 = 0x2AA;
> >     cfi_command(bank, 0x55, command);
> >     if((retval = write_memory(target, flash_addr(bank, 0, unlock2),
> > buf->width, 1, command)) != ERROR_OK)
> >     {
> >             return retval;
> >     }
> > /* snip */
> >
> > }
> 
>   I can't find this exact code in the file, could you point the line number?

Again with line no.
   2105 static int cfi_probe(struct flash_bank_s *bank)
   2106 {
        /* snip */

   2140         cfi_command(bank, 0x55, command);
   2141         if((retval = target_write_memory(target,
flash_address(bank, 0, unlock2), bank->bus_   2141 width, 1, command)) !
= ERROR_OK)
   2142         {
   2143                 return retval;
   2144         }
        /* snip */

New question about coding style: why the line's width has no limit?

> 
> >
> > I found the flash_address is not correct(my fault?), and address is
> > 0x10000554.
> >
> > >From cfi flash spec, detect manufacturer ID, the byte addr should be
> >
> > base + 0x555 I think.
> 
>   The address depends on your layout, depends on the chip and bus width.
I'm not sure. I thought that address must match the flash interface
specification. In this case, from the flash's datasheet where descripted
that. And also some other flash datasheet point the same thing as below:
Autoselect stage       (cycle, addr, data)
Manfacturer ID(word)    (1st, 555, AA)  (2nd, 2AA, 55) (3rd, 555, 90)
Manfacturer ID(byte)    (1st, AAA, AA)  (2nd, 555, 55) (3rd, AAA, 90)

Notice the address 0x2AA and 0x555, it's not 0x2aa * bus_width, but the
source code it is. Why?

Last, when I ran ./configure, it reported "Cannot build & run ...
libftdi" and I walk into the configure file, the test part use the
function `ftdi_new()' which my ftdi.h is not containing. I force it
return 0 for error-free.

My dist: debian(etch).

Regards,

--
ZJ

> >
> > After changed manually, it unlucily...  SO,  in this function, I adjust
> > write_memory() to target_write_u8() and it can probe success.
> > I 've no more idea about that.
> >
> > What's wrong? Is it a bug?
> >
> > Regards
> >
> > --
> > ZJ
> >
> 
>   Regards,
> 

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to