SPI external memory: Multiple SRAM 4Mbit IC, or a single NAND/NOR 16MByte IC, which is less trouble?
Hi, first of, I am not sure if this is the right forum to ask this type of question. Feel free to redirect me if needed.
So I am using STM32F446RE development board for an electric guitar looping pedal project. For my application, I require some amount of external memory to be added to save a couple seconds of guitar signal, to then be able to play it back in a loop. This raises the question: What would be the best type of memory to use for this application?
I am sampling at 48Khz/12bit and ideally would like to save at least 20 secs of music, which would require at least 1.5 to 2Mbyte of external memory.
Note that altough I understand the principles of SPI communication, I have never used it in a project, which is why I ask for your help on this one.
So I started looking for SPI/QSPI, DIP8 or SIOC8 memory IC on Digikey, and it seems my best two options are the following:
- Interfacing with multiple 4Mbit SRAM Slave ICs (this is the max amount of memory I found in SRAM): https://www.digikey.ca/products/en/integrated-circuits-ics/memory/774?k=&pkeyword=&sv=0&pv142=227886&sf=0&FV=961%7C407300%2C-8%7C774%2C1989%7C0%2C2043%7C406106%2C2043%7C406109&quantity=&ColumnSort=0&page=1&stock=1&datasheet=1&pageSize=25
- Interfacing with a single slave NAND/NOR Flash IC, which can hold many more Mbytes that needed (8MB, 16MB, and even more).
What would be the most efficient for my application? I would ideally like to be able to overwrite data written in memory (to, for example, add two signals together), so using Flash memory might cause some headaches when dealing with erasing and rewriting data (might also be too time demanding, depending on the chip).
On the other hand, since the SRAM module do not feature enough memory in a single IC, I would need to interface with multiple, I estimate at least 4 slaves, which I think shouldn't be too complicated with a correct managing of ChipSelects. How hard is that to manage? Do you have any example code to guide me through this?
I would really appreciate your insight on my issue,
Thank you very much
