This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

52832 timer consumes a lot of power

Hello 

A project that recently made a sensor found that the timer consumes a lot of power.

I built a timer to collect sensor data in the timer handler.

Sensor only cost 10uA, but I got 4ma  5ms .

I understand that there is no time-consuming operation in the timer handler, so do you have a good way to process the sensor data?

Thank you

Parents
  • Pretty much impossible to recommend anything since we have zero clue what task_read_kx022() actually does.

    By the looks of your scope output it busy-waits for the I²C transaction (or transactions ?) to finish - you could change that to use the I²C event handler, but this obviously requires non-trivial changes to the source code.

    Note: Does this sensor support SPI? That could transfer data one order of magnitude faster...

Reply
  • Pretty much impossible to recommend anything since we have zero clue what task_read_kx022() actually does.

    By the looks of your scope output it busy-waits for the I²C transaction (or transactions ?) to finish - you could change that to use the I²C event handler, but this obviously requires non-trivial changes to the source code.

    Note: Does this sensor support SPI? That could transfer data one order of magnitude faster...

Children
Related