How to initializing variable placed in SDRAM

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

How to initializing variable placed in SDRAM

1,171件の閲覧回数
jake111
Contributor I

There is a SDRAM on my board,and the SDK example "semc cm7" works which write serveral bytes then read and compare.

I want to place some big arrays to SDRAM,and set configuration in MCUXPresso IDE:

1.Add "Memory details" which region is RAM8

2.Add "Extra linker script input sections" in "Managed Linker Script"

Then declare a variable:

__DATA(RAM8) char test[8] = {1,2,3,4,5,6,7,8};

But the program fails to run to main.It seems the initializing code should be placed before "copy data" code.Then I put the SDRAM initializing code(including Pin,Clock,MPU and SEMC config) after "System_init()"(before copy data code),the read&write test passes.But the variable "test" is not initilalized as {1,2,3,4,5,6,7,8}.

How Can I copy the initializing data to SDRAM just like copying data to SRAM?And Why the program fails to run in the case of I initialize SDRAM after "copy data" code since it is actually not successfully copied to SDRAM?

 

And I've noted that .SCP file may relate to initialize the SDRAM.What is it used for?Do you have any document?

0 件の賞賛
返信
1 返信

1,104件の閲覧回数
jake111
Contributor I

Anybody?

0 件の賞賛
返信