Best practices to handly different sources

Hi!

What are the best practices to handle different sources and sinks?

This are the data sources and sinks:

  1. Connect to two different i2c’s.
  2. Serial connection to GNSS.
  3. Serial connection to RS485.
  4. LTE module for Internet communication.

Put handling of all sources in a while can become very complex. What are the alternatives?

Hi,

To give a reasonable answer, you would need to give a list of likely data rates for each source/sink and an estimate of the complexity of the data processing. For example, if you need to do any complex data filtering, then that will eat into your available compute budget.

Once the data rates and likely comute complexity are known, you can estimate whether your hardware is up to the task. If the hardware is OK then it is likely that with so many dataflows happening, the use of interrupt/DMA techniques will be necessary rather than using simpler polling methods. However, standard library functions should hide most of the ugly detail of the I2C, serial, and ethernet communication.

In terms of overall system management, my own preference would be to use the MBED RTOS with queues to buffer the incoming data for the system processing tasks.

Jim

1 Like