K70 external ram simple question

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

K70 external ram simple question

ソリューションへジャンプ
1,720件の閲覧回数
James8
Contributor I

Hi, I'm looking at using a K70 for a new project but having never used external ram in any embedded project before, I just have a simple question... once all the registers and what-not are set up, can the memory be used just like internal SRAM? i.e. completely transparently from the C code's point of view:

 

void foo(uint32_t * p)
{

*p = 0;

 

foo(sram_pointer);

foo(dram_pointer);

 

as oppose to say having to use some compiler extension like "unsigned int far *" or needing to use registers in order to actually read/write to the memory.

 

Are there any restrictions you think I might need to know about?

 

Thanks

0 件の賞賛
返信
1 解決策
1,278件の閲覧回数
konrada
Contributor IV

External RAM can be used like internal RAM; it lies in the same 32-bit flat address space. Things to look out for:

  • External RAM is slower => need to enable cache =>  need to flush/disable cache when dealing with DMA buffers
  • Debugger support is more adventurous. If your debugger and JTAG adapter work fine with internal RAM, that doesn't mean it will work fine with external RAM (e.g. can't read/write ext ram from debugger, can't put breakpoints on external RAM addresses). However, that's more a problem of immaturity of Kinetis tooling, and time is working for you. 

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,279件の閲覧回数
konrada
Contributor IV

External RAM can be used like internal RAM; it lies in the same 32-bit flat address space. Things to look out for:

  • External RAM is slower => need to enable cache =>  need to flush/disable cache when dealing with DMA buffers
  • Debugger support is more adventurous. If your debugger and JTAG adapter work fine with internal RAM, that doesn't mean it will work fine with external RAM (e.g. can't read/write ext ram from debugger, can't put breakpoints on external RAM addresses). However, that's more a problem of immaturity of Kinetis tooling, and time is working for you. 
0 件の賞賛
返信
1,278件の閲覧回数
James8
Contributor I

Cool, thanks.

 

I have a Jlink Ultra which at least claims to support external RAM, so I guess we'll see.

 

0 件の賞賛
返信