This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

__delay_cycles() and power consumption

I currently (but not for long) use __delay_cycles() to produce time delays.  During __delay_cycles(), measuring current, I go from 620 microamps to at least twice this value during __delay_cycles().  

Is this expected behaviour?

I thought simply stepping through processor cycles would not be so costly.

  • From current consumption point of view, executing  __delay_cycles() is the same as running other code that does not involve clock, pin, and other peripherals. The power consumed by running the CPU is almost proportional to the MCLK frequency used. 

**Attention** This is a public forum