K70 external ram simple question

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

K70 external ram simple question

Jump to solution
1,012 Views
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 Kudos
1 Solution
570 Views
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. 

View solution in original post

0 Kudos
2 Replies
571 Views
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 Kudos
570 Views
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 Kudos