16-bit SDRAM with SAM9260

Microchip in-system programming solution: SAM-BA

Moderators: nferre, fab

sunayski
Posts: 2
Joined: Sat Feb 02, 2008 3:37 pm

16-bit SDRAM with SAM9260

Fri Aug 15, 2008 9:03 am

Hello all,
Can someone explain me, why SAM-BA 2.8 gives the message "Error during external RAM initialization" when there is only one 16-bit SDRAM (MT48LC16M16A2 ) connected to SAM9260 as same as ATMEL's datasheet .
AT91SAM9260.pdf "20.7.1.1 Hardware Configuration" on page 155.

How we can work with SAM-BA when there is one 16-bit SDRAM on the board?
falingtrea
Location: Mounds View, MN
Posts: 209
Joined: Wed Jan 09, 2008 5:09 pm

Fri Aug 15, 2008 9:42 pm

I believe that is because SAM-BA is set up to support EK boards. If you have a custom board, you may have to create new board files and compile them.
sunayski
Posts: 2
Joined: Sat Feb 02, 2008 3:37 pm

Sat Aug 16, 2008 12:37 pm

How will we edit these monitor file sources and recompile them?
Please, Help !
falingtrea
Location: Mounds View, MN
Posts: 209
Joined: Wed Jan 09, 2008 5:09 pm

Tue Aug 19, 2008 5:16 pm

You need to download the Bootstrap 1.9 file from Atmel, modify the code and recompile it. There is some information in the documentation included in the install file.
fab
Contact:
Location: ATMEL Rousset France
Posts: 17
Joined: Thu Aug 17, 2006 9:46 am

Thu Sep 04, 2008 7:54 am

Hi,

On AT91SAM9260-EK, the SDRAM in connected with 32bits data bus width. The applet that initializes this external SDRAM is configured for 32 bits. This applet is automatically lauched at SAM-BA startup.

To modify this, in SAM-BA v2.8, you have to recompile the extram applet with the right settings. All applet sources and build command lines are in "C:\Program Files\ATMEL Corporation\AT91-ISP v1.12\SAM-BA v2.8\applets"
To do so, edit the file at91lib/boards/at91sam9260-ek/board_memories.c, find the function BOARD_ConfigureSDRAM, and replace AT91C_SDRAMC_DBW_32_BITS with AT91C_SDRAMC_DBW_16_BITS. Then recompile the applet (need a ARM gcc compiler like CodeSourcery one). You can find the make command line in build.pl file (remove INST_PREFIX=$ARGV[0]) and copy the resulting file (isp-extram-at91sam9260.bin) in C:\Program Files\ATMEL Corporation\AT91-ISP v1.12\SAM-BA v2.8\lib\AT91SAM9260-EK folder.

Then you should be able to get SAM-BA working with your 16 bits SDRAM

Regards,

Fab
ManuelSahm
Posts: 82
Joined: Tue Jun 26, 2007 6:27 pm

Fri Sep 05, 2008 3:16 pm

Hello,

I donwloaded the latest CrossCompiler from CodeSourcery and Sam-Ba 2.8.

make CROSS=~/arm-2007q1/bin/arm-none-linux-gnueabi- CHIP=at91sam9260 BOARD=at91sam9260-ek MEMORY=sdram_samba DYN_TRACES=1

error message:
/home/john/arm-2007q1/bin/arm-none-linux-gnueabi-gcc -Wall -mlong-calls -ffunction-sections -g -Os -I../../at91lib/boards/at91sam9260-ek -I../../at91lib/peripherals -I../../at91lib/memories -I../../at91lib/components -I../../at91lib -Dat91sam9260 -DDYNAMIC_TRACE_LEVEL -c -o obj/stdio.o ../../at91lib/utility/stdio.c
../../at91lib/utility/stdio.c:53: error: variable 'r' has initializer but incomplete type
../../at91lib/utility/stdio.c:53: warning: excess elements in struct initializer
../../at91lib/utility/stdio.c:53: warning: (near initialization for 'r')
../../at91lib/utility/stdio.c:53: warning: excess elements in struct initializer
../../at91lib/utility/stdio.c:53: warning: (near initialization for 'r')
../../at91lib/utility/stdio.c:53: warning: excess elements in struct initializer
../../at91lib/utility/stdio.c:53: warning: (near initialization for 'r')
../../at91lib/utility/stdio.c:53: warning: excess elements in struct initializer
../../at91lib/utility/stdio.c:53: warning: (near initialization for 'r')
make: *** [obj/stdio.o] Error 1

Please just help me to resolve this problem...
Thanks
talgil
Posts: 1
Joined: Thu Oct 09, 2008 10:13 am

Re: 16-bit SDRAM with SAM9260

Thu Oct 09, 2008 10:23 am

Hi Manuel,

We've got the same problem, did you get any reply or in case you get the 16-bit SDRAM bin file compiled could you please upload it ?

Thanks in advance

Talgil
regi
Posts: 1
Joined: Tue Oct 23, 2007 8:31 pm

Re: 16-bit SDRAM with SAM9260

Sun Oct 12, 2008 7:24 pm

Hi, there is noting to compile,

just open the SDRAM.tcl in folder
C:\Programme\ATMEL Corporation\AT91-ISP v1.10\SAM-BA v2.6\lib\AT91SAM9260-EK
with a simple text-editor serch for "32" and change it to "16".
SAM-BA now accept my EDDY-board with 16bit-RAM as AT91SAM9260-EK.
I can load a bin-file to RAM and verify it.
But still can't make it run :cry:

regards

Regi
windlazio
Posts: 1
Joined: Tue Jan 06, 2009 3:29 am

Re: 16-bit SDRAM with SAM9260

Tue Jan 06, 2009 3:37 am

Have you soloved this problem?I can use SAMBA to download the bin file to SDRAM,and the compare result is correct.But if I use the TCL_Go command to execute the program in SDRAM,the print message is unstable,I mean that sometimes I can get corecct message on the DEBUG serial,but maybe I will only get a little characters from it next time,do you also have this problem?
btw:I use the softpack_at91sam9260_v1.4 getting_started as the example.
svolpe
Posts: 12
Joined: Sun May 11, 2008 9:20 pm

Re: 16-bit SDRAM with SAM9260

Thu Jan 08, 2009 3:56 pm

I also had the same problem compiling SAM-BA v2.8 but finally did get it to compile, below are my notes, I also have attached my compiled 16 bit bus sdram driver:

Here is a posting on this forum that someone was nice enough to upload an attachment containing documentation from Atmel on how to compile the SAM-BA, it was what I used as a starting point:
samphpbb/viewtopic.php?p=15674#p15674

I was able to successfully compile after installing the following utils:
Cygwin (you only need the basic default stuff) this gives you mkdir, cp...:
make sure to add the cygwin bin directory to your windows PATH after the cygwin install!
http://www.cygwin.com

and the Codesourcery ARM Cross compiler
http://www.codesourcery.com/gnu_toolcha ... release642
I tried using other arm cross compilers but had no luck, although I did not put much effort into it as I needed to get things working quickly.

Also I had to use cs-make as it is the make that is part of the codesourcery.
Example:
run the following in the SAM-BA v2.8\applets\isp-applets\extram directory to recompile the ram initialization module:
cs-make CHIP=at91sam9260 BOARD=at91sam9260-ek MEMORY=sram_samba DYN_TRACES=0 clean all

I hope this helps!
Attachments
isp-extram-at91sam9260.zip
(1.28 KiB) Downloaded 233 times
Last edited by svolpe on Thu Jan 08, 2009 4:05 pm, edited 1 time in total.
svolpe
Posts: 12
Joined: Sun May 11, 2008 9:20 pm

Re: 16-bit SDRAM with SAM9260

Thu Jan 08, 2009 4:00 pm

regi wrote:Hi, there is noting to compile,

just open the SDRAM.tcl in folder
C:\Programme\ATMEL Corporation\AT91-ISP v1.10\SAM-BA v2.6\lib\AT91SAM9260-EK
with a simple text-editor serch for "32" and change it to "16".
SAM-BA now accept my EDDY-board with 16bit-RAM as AT91SAM9260-EK.
I can load a bin-file to RAM and verify it.
But still can't make it run :cry:

regards

Regi
Regi,
In version v2.6 I don't think there was anything to compile (or at least I know there was not in v2.5) however version v2.8 now requires you to compile the modules.
Regards,
Shane
socrates
Contact:
Location: Lithuania, Kaunas
Posts: 25
Joined: Tue Jan 29, 2008 6:57 pm

Re: 16-bit SDRAM with SAM9260

Sun Aug 02, 2009 11:21 pm

What if I make a copy of EK, but using LQFP208? Do I have to recompile SAM-BA?
http://www.socratesblog.eu
FPGA, CPLD, ARM, AVR projects and more.
socrates
Contact:
Location: Lithuania, Kaunas
Posts: 25
Joined: Tue Jan 29, 2008 6:57 pm

Re: 16-bit SDRAM with SAM9260

Fri Aug 21, 2009 6:47 pm

socrates wrote:What if I make a copy of EK, but using LQFP208? Do I have to recompile SAM-BA?
I answer myself for future people that may be confused:
You don't have to recompile SAM-BA.
http://www.socratesblog.eu
FPGA, CPLD, ARM, AVR projects and more.
dark_jedi
Posts: 1
Joined: Thu Sep 03, 2009 1:22 pm

Re: 16-bit SDRAM with SAM9260

Thu Sep 03, 2009 1:39 pm

Hi!

The information about changing the SDRAM data bus width from 32bit to 16 bit in SAM-BA 2.8 is very useful indeed, but what about the new version of SAM-BA - 2.9?
In this newer version, some of the files used in v. 2.8 are not present and I think the whole process of compiling and customization is changed.
Did anyone have any luck with successfully changing the data bus width in v 2.9?

Regards,
Lubomir
lhrossouw
Posts: 19
Joined: Thu Aug 27, 2009 4:15 pm

Re: 16-bit SDRAM with SAM9260

Thu Sep 03, 2009 2:44 pm

Hi,

I use SAM-BA 2.9 with a at91sam9g20 custom board and only changed variable extRamDataBusWidth to 16 in at91sam9g20-ek.tcl.

before I changed it to 16:
-I- -- EXTRAM ISP Applet 2.9 --
-I- -- AT91SAM9G20-EK
-I- -- Compiled: Jun 22 2009 14:59:31 --
-I- INIT command:
-I- Communication link type : 0
-I- Data bus width : 32 bits
-I- External RAM type : SDRAM
-I- Init SDRAM...
-I- Init successful.
-I- End of applet (command : 0 --- status : f)
Got error message:
Error during external RAM initialization.
External RAM access is required to run applets.
Continue anyway? yes or no

After I changed it to 16:
-I- -- EXTRAM ISP Applet 2.9 --
-I- -- AT91SAM9G20-EK
-I- -- Compiled: Jun 22 2009 14:59:31 --
-I- INIT command:
-I- Communication link type : 0
-I- Data bus width : 16 bits
-I- External RAM type : SDRAM
-I- Init SDRAM...
-I- Init successful.
-I- End of applet (command : 0 --- status : 0)
Samba started up successfully

Return to “SAM-BA”

Who is online

Users browsing this forum: No registered users and 1 guest