LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-06-2012, 08:59 PM   #1
rp0777
LQ Newbie
 
Registered: Nov 2009
Posts: 4

Rep: Reputation: 0
Data gets written to two different places in RAM


Hi,

I'm encountering this weird problem with writing to RAM on our custom board. Everytime I write to memory, it writes to two locations. One at the location that I want to write, and one other at address (Addr+0x400) or (Addr-0x400) (ex: writing to 0x31000000 would write the data to 0x31000000 and 0x31000400). Has anyone seen this issue before? Any suggestions on where I should look? Seems like it may be a configuration issue with the hardware but I'm not sure where to look.

To be specific, I use "mdb" command in Openocd Jtag Debugger for writing one byte. The CPU is Samsung S3C2440.

Any help is appreciated.

Thanks,
rp0777
 
Old 02-07-2012, 02:01 PM   #2
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
Did you check if the RAM module is working 100% ? Did you try to write more and different adresses?
Are you sure if your code is doing only once? Not much else i can think right now.

Regards

Last edited by ukiuki; 02-09-2012 at 03:05 AM. Reason: typo
 
Old 02-08-2012, 11:20 AM   #3
rp0777
LQ Newbie
 
Registered: Nov 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for your reply.

The issue occurs on all 4 of our custom boards. So I'd assume the RAM modules are working good.

I did try writing, 1k of data, to multiple places (0x31000000, 0x31000800, 0x33f80000, 0x33f80f00, etc.) and got the same result.

I did check the code to make sure it's writing only once. Not only it occurs with OpenOCD, the issue also occurs when writing to ram using U-Boot.

In addition, I just found out a different behavior. When running the board without initializations from U-Boot and writing one byte to location ADDR_X (ex: 0x31000000), it writes to all 4 bytes from ADDR_X to ADDR_X+4. In this case, it doesn't write to ADDR_X+0x400 as in the previous case.

Thanks.
 
Old 02-08-2012, 05:00 PM   #4
rp0777
LQ Newbie
 
Registered: Nov 2009
Posts: 4

Original Poster
Rep: Reputation: 0
fyi, I found the solution to my problem. Not sure if it'll help anyone but I'm posting it here anyway. The problem's related to the SDRAM initialization for SCAN value. I changed the SCAN value to 8-bit column address number and it worked.

Thanks again for your help Ukiuki.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Data written to unformatted disk peterlowrie Linux - General 1 01-14-2011 06:32 PM
/dev/..... Where is the data in this directory being written to? Completely Clueless Linux - General 10 08-22-2010 05:52 AM
Catch all data being written to Hard Drives vzxen Linux - Newbie 20 07-27-2010 08:43 AM
Linux partition over written with Fat32 data! hi-clier Linux - Newbie 2 11-21-2004 07:35 PM
Possible to make filesystem on disk with data written to it? redhatman Linux - Newbie 3 08-28-2004 10:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration