Fellow masters,
here is a rookie, asking probably a stupid question.
- I have a system that generates data, roughly 60KB/sec (coming from peripherals, industrial application)
- I need to ship this data to a PC using USB.
- For some reason, I need to align this data in my MCU every second to a correct format, add time stamps etc. before ship out to PC.
Now, the MCU I am using has only 8KB of memory, ideally, I would have written all data to RAM and fiddle with it and than ship to USB buffers and problem solved, however not in this case since I have a tiny RAM. (Or change PC software to fix this, however PC software is legacy and customer is not interested in me fiddling with PC).
I have some flash memory available that I can use as a circular buffer to write and read etc, however I find this not very elegant as I am afraid to miss data during this long arduous write operation as the data keeps coming. Now, I am considering couple of options and I wanted to get some ideas:
- Use SPI ram 1Mbit or so: There is a problem here as I use two available SPI ports to collect data from peripherals. If I multiplex the SPI, I am afraid I may loose data. (Even a single bit should not be lost, the peripheral just puts data to fifo, if you run the fifo, data is gone). Question: How do I calculate whether I run out of BW and loose data here?
- Use a second processor: Dedicate this one for data collection. Choose this one wisely. Size is a concern here and I cannot tolarate 60-70pins, need to be tiny and a lot of ram etc. Couldn't find one yet?
Anyway, hope you guys could offer some help.
Cheers, sgpee