This is the mail archive of the
mailing list for the eCos project.
Re: Atmel DataFlash commands?
- From: John Dallaway <john at dallaway dot org dot uk>
- To: Stanislav Meduna <stano at meduna dot org>
- Cc: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Sun, 21 Jun 2009 05:07:38 +0100
- Subject: [ECOS] Re: Atmel DataFlash commands?
- References: <4A3CF4A6.firstname.lastname@example.org>
Stanislav Meduna wrote:
> I am trying to interface with the Atmel DataFlash AT45DB642D
> 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:
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?
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss