For users of the Atmel AT91SAM7 and AT91SAM9 ARM CPU chips. Atmel has taken a new direction by combining on chip flash and ram with the ARM CPU on a single die. This provides low cost devices for small systems using the ARM CPU.
This group is to exchange information to help users get started and learn how to use the devices.
Strange dataflash behavior - "ICLI, Bekir (EXT)" - Apr 23 3:16:52 2008
Hi all,
I am trying to test my dataflash program where I write/read a couple of
bytes to/from dataflash.
But oddly enough, when I boot my code from dataflash, I can't even read
the flash id, however
booting from sdram, there is no problem..
Should I take some extra measures for flash initialization, when I boot
from dataflash?
Best regards
Bekir

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )
Re: Strange dataflash behavior - Johan Ingvast - Apr 23 4:16:50 2008
ICLI, Bekir (EXT) skrev:
> But oddly enough, when I boot my code from dataflash, I can't even read
> the flash id, however
> booting from sdram, there is no problem..
You can not access the Flash while programming it. The implication is
that the code that does the programming must be in ram and can not
access anything from flash.
In IAR compiler you make the code run in RAM by the function qualifier
"ramfunc".
This is probably already known to you but since it seem related it might
ring a bell.
/johan
>
--
Johan Ingvast, PhD, CEO BioServo Technologies AB
Mob. +46 70 34 34 498 http://www.bioservo.com
Pub. pgp sign.: http://www.md.kth.se/~ingvast/Ingvast_public_key.asc
------------------------------------

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )
AW: Strange dataflash behavior - "ICLI, Bekir (EXT)" - Apr 23 4:21:16 2008
Hi Johan,
But during the boot up, the code is copied from dataflash.
I thought after that, my code is in sram and has nothing to do with
dataflash until the next boot up.
Am I mistaken?
Best regards,
Bekir
________________________________
Von: A...@yahoogroups.com [mailto:A...@yahoogroups.com] Im Auftrag
von Johan Ingvast
Gesendet: Mittwoch, 23. April 2008 10:17
An: A...@yahoogroups.com
Betreff: Re: [AT91SAM] Strange dataflash behavior
ICLI, Bekir (EXT) skrev:
> But oddly enough, when I boot my code from dataflash, I can't even
read
> the flash id, however
> booting from sdram, there is no problem..
You can not access the Flash while programming it. The implication is
that the code that does the programming must be in ram and can not
access anything from flash.
In IAR compiler you make the code run in RAM by the function qualifier
"ramfunc".
This is probably already known to you but since it seem related it might
ring a bell.
/johan
>
--
Johan Ingvast, PhD, CEO BioServo Technologies AB
Mob. +46 70 34 34 498 http://www.bioservo.com
Pub. pgp sign.: http://www.md.kth.se/~ingvast/Ingvast_public_key.asc

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )Re: AW: Strange dataflash behavior - 42Bastian - Apr 23 5:19:03 2008
> But during the boot up, the code is copied from dataflash.
> I thought after that, my code is in sram and has nothing to do with
> dataflash until the next boot up.
> Am I mistaken?
No, your right. You cannot run code from DataFlash (or any other NAND
flash).
Try reseting everything related to the DataFlash (SPI, the DataFlash).
--
42Bastian
Note: SPAM-only account, direct mail to bs42@...
------------------------------------

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )
AW: AW: Strange dataflash behavior - "ICLI, Bekir (EXT)" - Apr 23 8:44:13 2008
Hi Bastian,
I am doing the SPI reset, but how do I do dataflash reset?=20
Best regards
Bekir=20
-----Urspr=FCngliche Nachricht-----
Von: A...@yahoogroups.com [mailto:A...@yahoogroups.com] Im Auftrag vo=
n 42Bastian
Gesendet: Mittwoch, 23. April 2008 11:19
An: A...@yahoogroups.com
Betreff: Re: AW: [AT91SAM] Strange dataflash behavior
> But during the boot up, the code is copied from dataflash.
> I thought after that, my code is in sram and has nothing to do with
> dataflash until the next boot up.
> Am I mistaken?
No, your right. You cannot run code from DataFlash (or any other NAND=20
flash).
Try reseting everything related to the DataFlash (SPI, the DataFlash).
--=20
42Bastian
Note: SPAM-only account, direct mail to bs42@...
------------------------------------

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )
Re: AW: AW: Strange dataflash behavior - 42Bastian - Apr 23 9:15:30 2008
Hi Bekir
> I am doing the SPI reset, but how do I do dataflash reset?
There should be a command to send to the DataFlash.
But I am just digging in the dark.
--
42Bastian
Note: SPAM-only account, direct mail to bs42@...
------------------------------------

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )
AW: AW: AW: Strange dataflash behavior - "ICLI, Bekir (EXT)" - Apr 24 5:07:55 2008
Hi Bastian,
I did some tests to find out the problem. And I have seen:
1- If I boot from dataflash or nandflash, I cannot have no communication wi=
th dataflash at all, not even "get id" retuns anything..
2- However, if I boot from sdram and sram (the same code), I am able to wri=
te/read..
The only thing that differs in these two situations (as far as I know) is t=
hat in the second case, before my code starts up, there is this "sam-ba boo=
t code" taking place..
Do you have an idea what exactly it does and how possibly it can affect my =
"dataflash operations"?
PS: I am totally stuck, right now, with finding this problem :(
Regards,
Bekir=20
-----Urspr=FCngliche Nachricht-----
Von: A...@yahoogroups.com [mailto:A...@yahoogroups.com] Im Auftrag vo=
n 42Bastian
Gesendet: Mittwoch, 23. April 2008 15:15
An: A...@yahoogroups.com
Betreff: Re: AW: AW: [AT91SAM] Strange dataflash behavior
Hi Bekir
> I am doing the SPI reset, but how do I do dataflash reset?=20
There should be a command to send to the DataFlash.
But I am just digging in the dark.
--=20
42Bastian
Note: SPAM-only account, direct mail to bs42@...
------------------------------------

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )
Re: AW: AW: AW: Strange dataflash behavior - Caglar Akyuz - Apr 24 7:09:15 2008
ICLI, Bekir (EXT) wrote:
> Hi Bastian,
>
> I did some tests to find out the problem. And I have seen:
>
> 1- If I boot from dataflash or nandflash, I cannot have no communication
> with dataflash at all, not even "get id" retuns anything..
>
> 2- However, if I boot from sdram and sram (the same code), I am able to
> write/read..
>
> The only thing that differs in these two situations (as far as I know)
> is that in the second case, before my code starts up, there is this
> "sam-ba boot code" taking place..
>
Is it possible that SAM-BA boot code is initializing SPI for you in the second
case whereas your own code fails to do so correctly? If I were you, I would
re-check my SPI init routine.
Caglar
------------------------------------

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )
AW: AW: AW: AW: Strange dataflash behavior - "ICLI, Bekir (EXT)" - Apr 24 8:17:48 2008
Hi Caglar,
I have checked every single register desperately, for both scenarios and
unfortunately they are the same at the very beginning.. :(
Best regards,
Bekir
________________________________
Von: A...@yahoogroups.com [mailto:A...@yahoogroups.com] Im Auftrag
von Caglar Akyuz
Gesendet: Donnerstag, 24. April 2008 13:09
An: A...@yahoogroups.com
Betreff: Re: AW: AW: AW: [AT91SAM] Strange dataflash behavior
ICLI, Bekir (EXT) wrote:
> Hi Bastian,
>
> I did some tests to find out the problem. And I have seen:
>
> 1- If I boot from dataflash or nandflash, I cannot have no
communication
> with dataflash at all, not even "get id" retuns anything..
>
> 2- However, if I boot from sdram and sram (the same code), I am able
to
> write/read..
>
> The only thing that differs in these two situations (as far as I know)
> is that in the second case, before my code starts up, there is this
> "sam-ba boot code" taking place..
>
Is it possible that SAM-BA boot code is initializing SPI for you in the
second
case whereas your own code fails to do so correctly? If I were you, I
would
re-check my SPI init routine.
Caglar

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )
Re: AW: AW: AW: AW: Strange dataflash behavior - Bernd Walter - Apr 24 9:01:19 2008
On Thu, Apr 24, 2008 at 02:17:37PM +0200, ICLI, Bekir (EXT) wrote:
> Hi Caglar,
>
> I have checked every single register desperately, for both scenarios and
> unfortunately they are the same at the very beginning.. :(
Don't forgett that there is more than just SPI itself.
You need to setup GPIO and clock distribution correctly.
According to what I have read in this thread I'm pretty sure that your
initialisation is at fault.
Do you have multiple devices on the same SPI? - maybe the difference is
if they get a CS signal or not and clash with your dataflash access.
If you can't find a software problem then get a scope or at least a
simple LED based logic tester to see if clock, CS, etc. are toggling
and if you find something search through your code again.
--
B.Walter
http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
------------------------------------

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )