Adding external RAM and FLASH through FlexBus

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

Adding external RAM and FLASH through FlexBus

3,322 Views
TravisHidlay
Contributor III

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?

0 Kudos
3 Replies

879 Views
gustavod
Contributor III

Hi Travis,

 

All I can say is that there is a tower module (TWR-MEM) that includes SRAM and serial flash memories:

 http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=TWR-MEM

 

I think you can realize how to connect these memories to your K60 kit through this board.

 

Best regards,

Gustavo

0 Kudos

879 Views
TravisHidlay
Contributor III

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?

 

Thanks Gustavo.

0 Kudos

879 Views
Dekiru
Contributor IV

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.

 

Regards

 

0 Kudos