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

Why am I seeing high current draw although I am requesting sleep state?

I am running a standard schedule loop where I wake-up, service any scheduled tasks, then immediately go back to sleep. However, I am observing the following pattern:

  1. Device enters its low power sleep state after initializing (~35uA system power).
  2. A interrupt wakes up the device due to a sensor FIFO becoming full.
  3. The interrupt handler schedules Task A to run.
  4. Task A is run:
  • read out the sensor FIFO values (floating point) into a local array
  • pass a pointer to the array of floats to another Function B which computes and returns the average of the array
  1. After Task A is run, the scheduler is empty so we attempt to enter the sleep state. However, the device power draw is in the 4.7mA range instead of going to sleep.

Do you have any idea why this might be occurring? It seems to occur only when I access that array in another function after having passed it in using a pointer. If I implement the contents of Function B in Task A itself, the unit does return to its original low power sleep state (~35uA) after step 5.

Parents Reply Children
No Data
Related