SDRAM Is Being Automatically Overwritten

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SDRAM Is Being Automatically Overwritten

Jump to solution
749 Views
echris
Contributor III

Hi,

I am using the external RAM (SDRAM) on the TWR-K65F180M.  I used the project that was provided by Marek Neuzil here: Re: can't read data back from SDRAM . I successfully got the program up and running.  However, I am noticing a bug in the program somewhere that is causing me problems.

If I place a break point on the line

-- for (address = (uint32_t *)SDRAM_BASE_ADD; address < MAX_ADDRESS; address++) {

or anywhere else, the value loaded into memory is NOT the last value to have been written there.  For example if I had just written 0x80000000 to 0x80000000 (in RAM) what I will see when I look at the RAM is something like 0x80005D3A.  Furthermore those bottom 2 Bytes (5D3A) will have been written into the bottom 2 bytes at all location in RAM.

I am very confused as to what would cause this.

Any help would be much appreciated.

Thanks!

EDIT:  Here is a screen shot of what RAM looks like at that location.

pastedImage_0.png

Tags (2)
0 Kudos
1 Solution
601 Views
echris
Contributor III

Ok it turns out there was a bug with processor expert.  A description on how to fix it is found at the bottom of this post.

Init of FlexBus pins in SDRAM mode

View solution in original post

0 Kudos
3 Replies
601 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Eric Christensen,

    Did you check the communicate wave between the RAM and the MCU? Whether you write the correct data 0x80000000 to 0x80000000 successfully? or just be modified after the correct writing? Maybe you can use the logic analyzer check the write sequence.

    Besides, you can combine with the printf, printf the RAM data instead of the IDE register view, use this way just to make sure it is not caused by the IDE register view windows bug.

Wish it helps you!

If you still have question, please contact with me!

Have a great day,

Jingjing

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
601 Views
echris
Contributor III

It is NOT just the IDE register view.  I have performed printf to various locations in memory and what is reported IS accurate.

As for whether 0x80000000 is be written.  Yes, it is.  You can see from the top 2 bytes that it IS loading and storing the value in RAM.

Do you get this same bug when you try the project?

Thanks.

0 Kudos
602 Views
echris
Contributor III

Ok it turns out there was a bug with processor expert.  A description on how to fix it is found at the bottom of this post.

Init of FlexBus pins in SDRAM mode

0 Kudos