When I send a read status command to an AT25F2048 SPI serial flash,
I always get 0xFF as the status.
I did send a write enable command right after my register inits.
Any ideas?
Thanks.
SPI serial flash status always 0xFF
Started by ●May 9, 2005
Reply by ●May 9, 20052005-05-09
Are you sure you're selecting the chip properly? If not it won't
respond
and drive the bus and you'll just see FFs. > -----Original Message-----
> From: AT91SAM7@AT91...
> [mailto:AT91SAM7@AT91...] On Behalf Of at91sam7s
> Sent: Tuesday, 10 May 2005 12:36 p.m.
> To: AT91SAM7@AT91...
> Subject: [AT91SAM7] SPI serial flash status always 0xFF > When I send a read status command to an AT25F2048 SPI serial
> flash, I always get 0xFF as the status.
>
> I did send a write enable command right after my register
> inits. Any ideas?
>
> Thanks. > Yahoo! Groups Links >
>
and drive the bus and you'll just see FFs. > -----Original Message-----
> From: AT91SAM7@AT91...
> [mailto:AT91SAM7@AT91...] On Behalf Of at91sam7s
> Sent: Tuesday, 10 May 2005 12:36 p.m.
> To: AT91SAM7@AT91...
> Subject: [AT91SAM7] SPI serial flash status always 0xFF > When I send a read status command to an AT25F2048 SPI serial
> flash, I always get 0xFF as the status.
>
> I did send a write enable command right after my register
> inits. Any ideas?
>
> Thanks. > Yahoo! Groups Links >
>
Reply by ●May 10, 20052005-05-10
I can see my CS0 pulling low when I tx and rx.
After the command, I see that the received signal
is all low. Wouldn't that mean all zeros? But
why did I get all ones though?
--- In AT91SAM7@AT91..., "Charles Manning"
<charles.manning@t...> wrote:
> Are you sure you're selecting the chip properly? If not it won't
respond
> and drive the bus and you'll just see FFs. > > -----Original Message-----
> > From: AT91SAM7@AT91...
> > [mailto:AT91SAM7@AT91...] On Behalf Of at91sam7s
> > Sent: Tuesday, 10 May 2005 12:36 p.m.
> > To: AT91SAM7@AT91...
> > Subject: [AT91SAM7] SPI serial flash status always 0xFF
> >
> >
> > When I send a read status command to an AT25F2048 SPI serial
> > flash, I always get 0xFF as the status.
> >
> > I did send a write enable command right after my register
> > inits. Any ideas?
> >
> > Thanks.
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
After the command, I see that the received signal
is all low. Wouldn't that mean all zeros? But
why did I get all ones though?
--- In AT91SAM7@AT91..., "Charles Manning"
<charles.manning@t...> wrote:
> Are you sure you're selecting the chip properly? If not it won't
respond
> and drive the bus and you'll just see FFs. > > -----Original Message-----
> > From: AT91SAM7@AT91...
> > [mailto:AT91SAM7@AT91...] On Behalf Of at91sam7s
> > Sent: Tuesday, 10 May 2005 12:36 p.m.
> > To: AT91SAM7@AT91...
> > Subject: [AT91SAM7] SPI serial flash status always 0xFF
> >
> >
> > When I send a read status command to an AT25F2048 SPI serial
> > flash, I always get 0xFF as the status.
> >
> > I did send a write enable command right after my register
> > inits. Any ideas?
> >
> > Thanks.
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
Reply by ●June 10, 20052005-06-10
I am also using the same AT25F2048 and have the status regiuster reading
and writting working properly but not programming and reading the actual memory
address. Has anyone made any progress with the part?? I have asked
ATMEL but they haven't gotten back to me.
You need to do a read the same way you do a write but by placing FF in the
Output.
Here is my code. Set character to 0xFF to do a read.
Last_xfer is for sending multiple commands in CSAAT mode without removing
the CS. if tru then it lowers the CS after the last command.
char SPI_Byte (const AT91PS_SPI pSPI, char character, unsigned int
cs_number, int last_xfer)
{
unsigned int value_for_cs;
char rx_char;
unsigned int value_for_cs;
char rx_char;
value_for_cs = (~(1 << cs_number)) &
0xF; //Place a zero among a 4 ONEs number
// Wait for transmit data register to become
available
while ( !(pSPI->SPI_SR & AT91C_SPI_TDRE) );
while ( !(pSPI->SPI_SR & AT91C_SPI_TDRE) );
if (last_xfer) pSPI->SPI_TDR = (value_for_cs <<
16) | character | AT91C_SPI_LASTXFER; // CS# | Character |
Last xfer
else pSPI->SPI_TDR = (value_for_cs << 16) |
character; // CS# | Character
// Wait for receive data register to indicate incoming
data
while ( !(pSPI->SPI_SR & AT91C_SPI_RDRF) );
while ( !(pSPI->SPI_SR & AT91C_SPI_RDRF) );
rx_char=((pSPI->SPI_RDR) & 0xff);
return (rx_char);
}at91sam7s <a...@yahoo.com> wrote:
return (rx_char);
}at91sam7s <a...@yahoo.com> wrote:
I can see my CS0 pulling low when I tx and rx.
After the command, I see that the received signal
is all low. Wouldn't that mean all zeros? But
why did I get all ones though?
--- In A...@yahoogroups.com, "Charles Manning"
<charles.manning@t...> wrote:
> Are you sure you're selecting the chip properly? If not it won't
respond
> and drive the bus and you'll just see FFs.> > -----Original Message-----
> > From: A...@yahoogroups.com
> > [mailto:A...@yahoogroups.com] On Behalf Of at91sam7s
> > Sent: Tuesday, 10 May 2005 12:36 p.m.
> > To: A...@yahoogroups.com
> > Subject: [AT91SAM7] SPI serial flash status always 0xFF
> >
> >
> > When I send a read status command to an AT25F2048 SPI serial
> > flash, I always get 0xFF as the status.
> >
> > I did send a write enable command right after my register
> > inits. Any ideas?
> >
> > Thanks.
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
>
__________________________________________________