I'm designing a project, based on an MK40, that communicates with a custom peripheral "slave" chip via I2C. This peripheral chip also acts as an SPI "Master" with an external Serial Flash Memory. The MK40 has more Flash than I need for my Application, and it also has both SPI and DSPI ports and DMA Controllers that are unused. Is it possible to connect the SPI Master Port of the Peripheral to an SPI or DPSI Slave Port on the MK40 so that an unused portion of MK40 Flash can emulate the external Serial Flash; thus omitting the external Flash chip? Has anyone done this? Are there App Notes dealing with DMA and SPI Slave Ports? Anyone have some CodeWarrior 'C' Code to handle this? Thanx - Ellery
Solved! Go to Solution.
Hi,
MK40 DSPI module could works as SPI slave, after receive the data from SPI bus, it could trigger a DMA transfer to move data to internal memory.
Customer can move data to the internal RAM. Then customer can program related data from RAM to internal Flash memory.
Please check attached two example codes about how to use DSPI module with DMA and another example shows how to emulate Flash memory as EEPROM.
Wish it helps.
Hi,
MK40 DSPI module could works as SPI slave, after receive the data from SPI bus, it could trigger a DMA transfer to move data to internal memory.
Customer can move data to the internal RAM. Then customer can program related data from RAM to internal Flash memory.
Please check attached two example codes about how to use DSPI module with DMA and another example shows how to emulate Flash memory as EEPROM.
Wish it helps.
Thank you, Hui_Ma.
Your response is targeted, specific and complete. Just what I needed.
I'm thankful for your guidance.
- Ellery
Ellery Potash, Sr.Engineer
LATHEM TIME CORP.