SDRAM Is Being Automatically Overwritten

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SDRAM Is Being Automatically Overwritten

ソリューションへジャンプ
1,805件の閲覧回数
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

タグ(2)
0 件の賞賛
返信
1 解決策
1,657件の閲覧回数
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 件の賞賛
返信
3 返答(返信)
1,657件の閲覧回数
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 件の賞賛
返信
1,657件の閲覧回数
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 件の賞賛
返信
1,658件の閲覧回数
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 件の賞賛
返信