AT91SAM9N12 Custom Board SAM-BA External Ram Fail

Discussion around AT91RM9200 and SAM9 Series Products.

Moderator: nferre

cenkkeskin
Posts: 4
Joined: Mon Oct 10, 2016 8:05 pm

AT91SAM9N12 Custom Board SAM-BA External Ram Fail

Mon Oct 10, 2016 8:28 pm

Hi everyone I am new to forum so if i do some mistakes sorry already.

I designed a linux board with at91sam9n12 with external 512 mb SDRAM 2.5ns along with 4gib nand flash and 16mbit ic flash where i am inspired by this source http://hforsten.com/making-embedded-linux-computer.html. And followed the exact same steps but i am failed. :(

The problem is when i connected the board with usb device port to the windows samba sees the board(Also reset pin on the board work so i can say computer sees at91sam9n12 controller) then i select at91sam9n12-ek board to connect but it says EXTERNAL RAM INITIALIZATION FAILED, EXTERNAL RAM ACCESS IS REQUIRED FOR RUNNING APPLET. CONTINUE ANYWAY.

If i click continue anyway it opens and if i click enable nandflash or so on then SAMBA program crashes. I soldered 3 different board and get the same issue every time. Once i connected the board without soldering the RAM and it gave me the same error. Is this happening because of a soldering problem or do i need to change some initialisation files where i have no knowledge in the case of programming of these devices and changing its configuration files. I am new to field, could someone please help.

This is log output:

-I- Waiting ...
-I- TCL platform : Windows NT
-I- SAM-BA 2.11 on : windows
-I- Retrieved arguments from command line :
-I- argv 0 : \usb\ARM0
-I- argv 1 : AT91SAM9N12-EK
-I- argv 2 : at91sam9n12ek_demo_linux_serialflash.tcl
0
\USBserial\COM5
-I- Connection : \USBserial\COM5 (target(comType) = 0)
-I- Board : at91sam9n12-ek
-I- Traces Level : 4
-I- target(handle) : 23881904
Read device Chip ID at 0xfffff240 --- get 0x819a07a1
-I- Found processor : at91sam9n12 (Chip ID : 0x819a07a1)
sourcing device file C:/Program Files (x86)/ATMEL Corporation/sam-ba_2.11/sam-ba.exe/../tcl_lib/devices/at91sam9n12.tcl
sourcing board description file C:/Program Files (x86)/ATMEL Corporation/sam-ba_2.11/sam-ba.exe/../tcl_lib/at91sam9n12-ek/at91sam9n12-ek.tcl
-I- Loading applet applet-lowlevelinit-sam9n12.bin at address 0x300000
-I- Memory Size : 0x0 bytes
-I- Buffer address : 0x4
-I- Buffer size: 0x0 bytes
-I- Applet initialization done
-I- Low level initialized
-I- External RAM Settings : extRamVdd=0, extRamType=1, extRamDataBusWidth=32, extDDRamModel=0
-I- External RAM Settings : extRamVdd=0, extRamType=1, extRamDataBusWidth=32, extDDRamModel=0
-I- Loading applet applet-extram-sam9n12.bin at address 0x300000
-E- Error during external RAM initialization.
-E- External RAM access is required to run applets.
-E- Connection abort
MrHat
Posts: 10
Joined: Mon May 16, 2016 1:56 pm

Re: AT91SAM9N12 Custom Board SAM-BA External Ram Fail

Tue Oct 11, 2016 12:10 am

Hi Cenkkeskin,

The SAM-BA and ROM monitor uses external ram for loading applets. If the ram does not work correctly the applets cannot load and most of the SAM-BA functionality will not work.

If you have JTAG and a debug pod, use this to test your external ram, perhaps the timing is out or PCB layout is not correct.

SAM-BA 2.11 is good but is a bit old - the latest is SAM-BA 3.1.4, but from version 3 there is only command-line interface.
cenkkeskin
Posts: 4
Joined: Mon Oct 10, 2016 8:05 pm

Re: AT91SAM9N12 Custom Board SAM-BA External Ram Fail

Tue Oct 11, 2016 2:08 am

I have been digging the sam-ba 2.16 files and there is tcl_lib/at91sam9n12-ek directory. In this directory there are applets for external ram nand and so on plus 2 tcl files lowlevelinit and at91sam9n12-ek.tcl.

In at91sam9n12-ek.tcl there are ram option variables:
variable extRamVdd 0 (0 for 1.8 V)
variable extRamType 1 (1 for DDR Ram 0 for SDRAM)
variable extRamDataBusWidth 16(I made this 16 but still log says 32)
variable extDDRamModel 0

If i change these values the log screen shows the change except extRamDataBusWidth.Even if I made the extRamDataBusWidth equal to 16 log shows 32. And my sdram ddr2 512mb ram is 16bit(It is model is W9751G6KB-25-ND 8MX4BANKSX16BIT DDR2 SDRAM). I think this must be the problem so how can i change this. This approach is also presented in this documentation(http://electronix.ru/forum/index.php?ac ... t&id=70415) however I cannot change the 32 to 16. It is written 16 in file but log still says 32

-I- External RAM Settings : extRamVdd=0, extRamType=1, extRamDataBusWidth=32, extDDRamModel=0
-I- External RAM Settings : extRamVdd=0, extRamType=1, extRamDataBusWidth=32, extDDRamModel=0
-I- Loading applet applet-extram-sam9n12.bin at address 0x300000
-E- Error during external RAM initialization.
-E- External RAM access is required to run applets.
-E- Connection abort

(LATER EDIT:)
I changed the 32 to 16 in somewhere else it did not affected so do you think is it pcb related issue?
cenkkeskin
Posts: 4
Joined: Mon Oct 10, 2016 8:05 pm

Re: AT91SAM9N12 Custom Board SAM-BA External Ram Fail

Tue Oct 11, 2016 6:27 pm

I have checked the pcb layout and it looks correct and since i soldered 3 different board and 3 of them are saying ram fail there should be something else. Anyone else has any idea?
blue_z
Location: USA
Posts: 1496
Joined: Thu Apr 19, 2007 10:15 pm

Re: AT91SAM9N12 Custom Board SAM-BA External Ram Fail

Tue Oct 11, 2016 9:40 pm

If you changed the memory IC from the reference design that SAM-BA is expecting, then of course you have to modify and rebuild the applet(s).
Look at applets/sam9n12/libraries/libboard_sam9n12-ek/source/board_memories.c in your SAM-BA directory.

Regards
cenkkeskin
Posts: 4
Joined: Mon Oct 10, 2016 8:05 pm

Re: AT91SAM9N12 Custom Board SAM-BA External Ram Fail

Tue Oct 11, 2016 11:16 pm

Thank you for reply. If I change bord_memories.c do i need to recompile anyting with make and if so could you give me brief intorduction on how to do it.
blue_z
Location: USA
Posts: 1496
Joined: Thu Apr 19, 2007 10:15 pm

Re: AT91SAM9N12 Custom Board SAM-BA External Ram Fail

Wed Oct 12, 2016 2:11 am

I've never rebuilt any SAM-BA applets before, but it looks like the Makefile in each applets/SoC/sam-ba_applets/ subdirectory will do the job for you.
You'll need (in your PATH) a bare-metal toolchain (i.e. with prefix arm-none-eabi) based on gcc 4.4.1.
Otherwise export the variables CROSS_COMPILE and LIB_PATH in your environment.

A `make all` in applets/sam9n12/sam-ba_applets/ should repopulate tcl_lib/at91sam9n12-ek/ with new .bin files.

Also see http://atmel.force.com/support/articles ... -BA-applet
and
http://www.atmel.com/Images/Atmel-42438 ... T09423.pdf
Section 7.3 is a detailed description of code edits (in SAM-BA 2.14) needed for a different DRAM chip.

Regards
Last edited by blue_z on Wed Oct 12, 2016 2:33 am, edited 1 time in total.

Return to “SAM9 ARM9 MPU”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests