[ECOS] Re: Atmel DataFlash commands?
John Dallaway
john@dallaway.org.uk
Sun Jun 21 04:07:00 GMT 2009
Hi Stano
Stanislav Meduna wrote:
> I am trying to interface with the Atmel DataFlash AT45DB642D
> (http://www.atmel.com/dyn/resources/prod_documents/doc3542.pdf)
> in the serial mode over the SPI. The current
> devs_flash_atmel_dataflash.c states
>
> // Read commands opcodes
> #define DF_CONT_ARRAY_READ_CMD 0x68
> #define DF_MMEM_PAGE_READ_CMD 0x52
> #define DF_BUF1_READ_CMD 0x54
> #define DF_BUF2_READ_CMD 0x56
> #define DF_STATUS_READ_CMD 0x57
>
> However, these are _not_ what the datasheet of the part
> defines and e.g. the DF_CONT_ARRAY_READ_CMD actually
> returns wrong data (the bytes returned seem to be shifted
> 1 bit to the right)
>
> According to the datasheet (and another working source I have
> access to) the correct commands in the serial mode are:
>
> #define DF_CONT_ARRAY_READ_CMD 0xe8
> #define DF_MMEM_PAGE_READ_CMD 0xd2
> #define DF_BUF1_READ_CMD 0xd4
> #define DF_BUF2_READ_CMD 0xd6
> #define DF_STATUS_READ_CMD 0xd7
>
> This DF_CONT_ARRAY_READ_CMD works.
>
> I have no access to other hardware using this or any other
> DataFlash, so I am not sure whether these defines actually
> work on other hardware.
Here's the datasheet for older revisions of the same part:
http://www.datasheetcatalog.org/datasheet/atmel/DOC1638.PDF
It looks like the existing read command opcodes in the DataFlash driver
refer to an older SCK/CLK mode which is not supported in newer devices.
Can you determine whether we need to continue to support the old SCK/CLK
mode from the timing diagrams?
John Dallaway
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list