This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using a SPI RAM for heap

I'm using the MDK-ARM and I would like to use an external RAM IC that communicates through SPI as my Stack/heap RAM. instead of the internal RAM that is on my Micro. I just can't seem to find a good resource or tutorial on how to do this. I believe this is a uVision question. I know I have to do something to the start up file and check the box for External RAM in the target options, but how does the compiler control the SPI lines to read and write.

For Example:

char Count;

Count = 1;

How does the compiler know to store Count in external RAM and how does it know how to control the SPI lines.

Is this even possible?

Parents
  • How would the processor know that it have to perform SPI communication to access memory?

    Well, you could use an address space region that causes a hard fault when accessed. Then do the magic in the hard fault handler. With some read-ahead and caching you could achieve performance that's better than abysmal. This would take considerable development effort, however.

Reply
  • How would the processor know that it have to perform SPI communication to access memory?

    Well, you could use an address space region that causes a hard fault when accessed. Then do the magic in the hard fault handler. With some read-ahead and caching you could achieve performance that's better than abysmal. This would take considerable development effort, however.

Children