0
\$\begingroup\$

I'm using an ATSAME70Q21 MCU to record 32 channels of analogue data (via SPI ADCs) and 32 channels of digital data (via GPIO). My embedded device has an iMX6-based CoM (Toradex Apalis), which runs Embedded Linux and provides an OpenGL GUI, touch interface, USB connectivity, etc. Before implementing the MCU approach, I was collecting the data from the Embedded Linux SoM directly, and saving it to a SQLite DB.

How can I save the data to the CoM SQLite DB directly from the MCU? Would an RPC approach be sensible? If not, would a socket-based TCP/IP approach be sensible? In terms of hardware, I'm leaning towards utilising a direct ethernet connection between the MCU and CoM, but could use UART instead if that's more appropriate. Assume the highest bitrate is 5Mbps.

\$\endgroup\$
  • \$\begingroup\$ Sorry for my ignorance, but what are: "Embedded Linux CoM", iMX6-based CoM? Links please. Also, what is required: real-time acquisition (time-accuracy-critical), time-stamped packets (handled by the uC), or other? \$\endgroup\$ – Chris Knudsen Jun 26 '18 at 12:44
  • \$\begingroup\$ My apologies, I should have provided more detail. I've updated the original post with links. My current preference is for time-stamped packets handled by the uC, and sent to the CoM. \$\endgroup\$ – jars121 Jun 26 '18 at 22:23
  • \$\begingroup\$ This kind of thing was often done with a cypress USB 2 fifo chip and an FPGA. Not to say you can't do it with a fast MCU, but it's going to be mostly about buffer memory and DMA - processors don't really like fast interfaces timed by the other end unless they are decoupled by hardware-managed buffers. \$\endgroup\$ – Chris Stratton Jun 26 '18 at 22:59
  • \$\begingroup\$ I completely understand Chris. My approach is as follows: record the data with MCU at the desired frequency (1000sps for example), store the data as an array in memory, then routinely send the array to the CoM. The CoM function can receive the array and commit it to the SQLite DB. How often the MCU sends the packets is dependent on memory utilisation, but will need to be often enough to support 60fps updates to the CoM GUI. I.e. 100 transmissions per second should allow for some overhead and processing time to support 60fps GUI updates. \$\endgroup\$ – jars121 Jun 26 '18 at 23:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.