I'm working on a project in which I have to solve this problem. I'm not sure if it's unique, but it's certainly not one I've seen before so I thought it'd be interested to get some input from people smarter than myself!
The project has two systems, and the the requirements of each are...
System 1 (RTOS on STM32L4)
- Must log data continuously (measurement at 10Hz)
- Store a total of 100MB data per period (1 day)
- Can only buffer data/be interrupted for ~5s at most
- Must not lose any data
System 2 (Embedded Linux on i.MX8M Mini)
- Must access and copy the most recent chunk of data at the end of each period
- Copied data should be stored on removeable storage media
- Must only be active for a short period of time to copy/analyse data
The parts have been selected to meet other requirements (peripherals, power, etc) and can't be changed. Common interfaces for both systems include SPI, SDIO, USB, I2C, and UART. The systems will be located <10cm from each other, but on two PCBs.
My current idea is to use two SD cards over SDIO, multiplexed to switch which SD card is accessed by which system (see diagram). SD cards are a nice option because they're easy to service and data can be checked manually. In principle this should work, but I am concerned I can't control the SDIO clock on the embedded Linux side, meaning implementation would be challenging or maybe impossible when it comes to layout.
Any input/discussion welcome!