I currently have a design where a microcontroller reads audio data via SPI interface and writes to the SD card. I am currently generating 600KB file every minute. I am roughly writing at 10KB/sec.
I have to migrate my design to an Arduino Yun for several. I am using this Yun shield + Arduino Mega 2560 board. Since the SD card is not interfaced to the microcontroller on the Yun, I will have to write this via serial port.
I tried the File IO class of the Arduino Bridge. and it seems to be slow for requirements (it took 12 seconds to load a 40KB plugin. It takes only 2.15 seconds in my current design).
I have concluded that I have to write my own application with message header, CRC check etc at both the linux ends. I have a couple of questions:
Has someone tried writing their own UART-SD interface for the Yun? (I could avoid re-inventing the wheel)
At 115200 or 230400 bps, is it possible to write at approximately 10 kB/s with all the CRC check, message header etc?
According to the Atmega2560 datasheet, the microcontroller is capable of transmitting data via the UART interface at 1M bps when it is operated at 16 MHz. ( I have personally tried this with an Atmega328). Is the bootloader necessary for remote upload of hex files if it is compiled in Atmel studio?
Which route is better? Custom serial port API implemented in an Arduino sketch or code written in Atmel studio?