This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

external memory



Dear All.

How can I expand cortex m4f data and program memory with external one? I noticed that in datasheet in memory map there is an area dedicated to external RAM but I haven't found any further details on this topic.

Thanks,

Jiri

  • Data memory is greatly eased via use of serial (SPI) data-flash.  (small, inexpensive 8 pin devices abound)

    Program memory is different bird - much more involved - and may be less than best choice.  (consider MCU w/greater internal program store)  External program memory will most always be less efficient (than internal) and add to your board size & cost... 

    You may note that certain, older M3 parts (relegated NRND) made special provisions to accommodate such external memory.  (and I/O)  Minus such "special purposing" - enslaving an M4 (not so equipped) to such task may prove unwise...

  • I do not really care about efficiency. I just need to run unit test on the target. Timing wouldn't an issue in the majority of tests.

  • And your proposal for, "executing code" stored in external, parallel flash is? .......

  • I do not know. I just need to expand data (and possibly flash) memories in order to run tests as test suite takes a lot of memory. I have no idea how to interface with external memory. Is there a periphery allowing this (probably SPI as you pointed out)? How should I tell the micro to read data from external chip and what do I need to provide it to do that, etc.

  • Yes those special provisions of M3 chips would be nice to have.... OK, maybe I need to think about something else - lighter test suit is one option.

  • Jiri Senkyr said:
    lighter test suit is one option.

    LIGHTER, EASIER - always better.  KISS!

    Connecting external, parallel memory to an MCU is always an adventure.  (thus - the movement decade+ ago to include memory w/in the MCU)  It will be unpleasant for you to "harvest" both address bus and data bus - from "plain vanilla" M4 - and this does not even "touch" upon the complexity of then executing code which has been fetched from external device!   This is a serious undertaking...

    Have you considered two or more such M4 MCUs - with your test suite divided among the M4s?  In this manner - ZERO external Program memory is required - you may still store to the data-flash - as past suggested.

    BTW - speed & efficiency have been important in past test suites we've encountered.  (you state - of little concern)  Again - this is not a simple undertaking...

  • The external memory area mentioned in the memory map is set aside for MCUs that do support attachment of external, parallel memory. While some of our LM3S parts have this ability (see lm3s9d96, for example), none of the current LM4F parts do so, if you want extra storage on a system using one of them, you would need to use some kind of serial memory (and, hence, be unable to execute from it directly). If it is vital to have many tests available at once and if the total size of the tests exceeds the available flash, you could use overlays or some similar structure to compile multiple tests that reside in SRAM and load these one at a time from your external memory before executing them. This is, however, non-trivial and likely to be rather toolchain specific.

  • Hi,

    you did not mention how large your memory expansion should be!

    As already mentioned, using SPI to attach memorys to is fast and (most often) easy to do!

    I.e. Using a microSD card will increase your non-volatile memory up to some GB for a minimum cost/GB, adding an FRAM to the bus will give you a fast, non-volatile) 'SRAM' expansion (i.e. Fujitsu FRAM 256K(32Kx8)Bit SPI MB85RS256A or Ramtron FM24V10 1Mb (128Kx8)).

    Another option is using Adesto (former Atmel) Data Flash (i.e. AT45DB642D 64Mb). There are a lot more serial flashes out there (i.e. Spansion), so: it's up to your choice (and wallet).

    aBUGSworstnightmare

     

  • aBUGSworstnightmare said:
    using SPI to attach memorys to is fast and (most often) easy to do!

    Our esteemed Bug - perhaps not - poster seeks to expand his program memory - not just data!

    If you've a fast (and often) easy method to "fetch" such program data from an 8 pin serial flash - and then execute that very data - such may even cause the "Re-Launch" of recently departed, (moment of silence)... Sharing Forum!  

    For data store - as my (first) answering post recited - serial data flash is very likely, best practice...

    And, " adding an FRAM to the bus " - unfortunately - current crop of Stellaris M4s are "bus-lite" - not one pin devoted to either address or data!  As you know - bit banging GPIO to achieve such "addressing" falls outside, "best practice."

  • One use of the external memory interface (EBI/EMI) that was available on the LM3S9B family was for interfacing to FPGAs or CPLDs that implemented a custom peripheral or interface. The beauty of using the EBI/EMI was that once the hardware/firmware was implemented, the FPGA or CPLD  based peripheral appeared to the software just like any other memory mapped microcontroler peripheral. Simple, elegant, and software efficient without the need or inefficiency associated with bit banging or going through I2C/SPI. In earlier roadmap information on the M4F, there was mention of future devices supporting an EBI/EMI, however, now I cannot find any mention of it. Does TI still have plans to offer M4F devices with EBI/EMI? This has become a more urgent issue now that the LM3S family has gone NRND.

  • As you note, none of the currently available LM4F parts includes EPI (Extended Peripheral Interface). Obviously, I can't comment on features in any unannounced parts but, if you contact your local TI FAE and ask them nicely, they will probably be happy to give you good news (though you may have to sign an NDA first).

  • Just to get approval. Does it also mean, there is no LM4F, where you can connect TFT display with 16bit data lines and run over DMA?