7 Replies Latest reply on Feb 10, 2016 11:43 AM by CMata_Intel

    Issues with time_ms() and time_us() in MCU API when using host_send() and host_receive()

    Bylos

      Hello everyone,

       

      In spite of the current limitations of the MCU, I managed to build a proper application using I2C, UART1 and GPIO at quite a high rate (sensors are read on I2C at several hundred times per second)

      I have used time_ms() and time_us() for software timers without any issues until now.

      But now I am additionnally using the interface with host (host_send() and host_receive()) to exchange information with an application running on Linux and I'm facing a weird issue with the values returned by time_ms() and time_us() functions. It seems that sometimes, around 220 seconds are suddenly added to the execution time.

      I am writing the value on /dev/ttymcu1 for debug purpose every 8 second and here is an example of the values retrieved :

      248

      256

      264

      272

      499 <-- suddenly around 220s more

      725 <-- same here

      956 <-- same here

      964

      972

      1201 <-- same here

       

      This happens only when data are transferred between the MCU and host on /dev/ttymcu0

      Did anyone who use the MCU already have this issue or would have some idea to solve the problem ?

      Many thanks in advance,