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

sd_app_evt_wait() doesn't give microamps consumption

Okay, I know there's a lot of threads about the subject. I have tried to read them all, with no help. My device still consumes 1.4 mA. Resetting does not help, so I assume it's not the debug-mode issue.

There's a lot of mentions that I should put all the peripherals I don't need into off state, before entering sd_app_evt_wait(). However, I cannot find any examples how to do that. That is, a piece of C-code how all those peripherals (UART, TWI etc.) can be configured into off state? Of course, such codes must exist somewhere, but why you cannot include them into all those answers? Links?

(If I put the whole system into off state using sd_power_system_off() I can reach 48 uA, which is quite reasonable due to other external peripherals we have on the board.)

Please help, I am quite frustrated... :(

Parents
  • NRF_TWI->POWER=0
    NRF_UART->POWER=0
    

    etc. turns modules entirely off

    Of course once they are truly off they aren't going to do anything at all, send out data, send interrupts etc. Usually you don't want to power them off in order to enter app wait() (which is really just __wfe) but you want to power them off when they have finished doing their current task.

Reply
  • NRF_TWI->POWER=0
    NRF_UART->POWER=0
    

    etc. turns modules entirely off

    Of course once they are truly off they aren't going to do anything at all, send out data, send interrupts etc. Usually you don't want to power them off in order to enter app wait() (which is really just __wfe) but you want to power them off when they have finished doing their current task.

Children
  • Thanks, it looks like UART was using most of the power. Now I can achieve acceptable level :)

    Yes, you are right that underscores are the traditional coding style for plain C. I got familiar with those at around 1988. It is really partially matter of what you get used to, but having read different kind of coding styles all these years, I personally favor camelCase. For my eyes, it is just more readable i.e. consumes less brain power... ;-) (I guess the difficulty to distinguish between a space and an underscore causes the incoherence.)

Related