I'm exploring the option of adding an external RAM and FLASH chip to my circuit board, and I was wondering if there's a reference design for how to connect this to the Kinetis chip through the FlexBus lines. I'm currently using the TWR-K60N512 development unit, and there isn't any hardware design in the schematic for interfacing with external memory, since this board doesn't use external mem.
Aside from the hardware interface, are there any other steps that need to be taken to make additional RAM accessible to an MQX app? I'm coming from an 8051 background where the external memory access is handled automatically by the compiler and processor. What about reading/writing from external flash? I saw two examples in the MQX distribution, flashx and nandflash; do these work for external flash chips or do they access part of the built-in 512KB of flash on the K60?
All I can say is that there is a tower module (TWR-MEM) that includes SRAM and serial flash memories:
I think you can realize how to connect these memories to your K60 kit through this board.
Yes your right, I forgot about the memory module. This will have the hardware designs, but will the additional ram be automatically avaialble to an MQX application, or is there additional software configuration that needs to be done?
MQX (for TWR-K60) enables MRAM accessing via Flexbus by default.
See kinetis_init function in hw_init.c file.
You can access to MRAM by its address that is defined in lcf file (__EXTERNAL_MRAM_RAM_BASE)
If you do your own hardware, you may use another memory chip rather than MRAM, so you have to change _bsp_flexbus_setup and _bsp_flexbus_mram_setup functions arcordingly.