Solved! Go to Solution.
Could you share a little more about how the current is measured? If the current is for the whole custom device (nRF52832+BME680), there may be some specific behavior or configuration of the nRF52 that are out of our reach.
~6mA could be indicative that the nRF52 is not able to go to sleep. For example if the FPU generates a pending interrupt that is not cleared/handled, the CPU won't be able to go to sleep.
thanks for your answer. Yes, I'm measuring the current flowing through the whole custom board (nRF+BME) and your suggestion may be right: the problem is caused by the use of BME but the one who's consuming power is actually the nRF. As you mentioned, this is most likely due to floating point calculations. Is it possible to substitute such calculations or they're essential for the BSEC? In any case, I'm now investigating on how to solve this on the nRF side.
Unfortunately floating point compensation is mandatory for BSEC.
I believe a workaround is mentioned in the nRF52832 errata (chapter 3.25). A possible alternative from Nordic's DevZone would be to implement the FPU IRQ handler to clear its flags.
Yes, there is a workaround for it, however it did not change my situation. I'm afraid my problem was also due to the sleep() function I was using with bsec_iot_loop(). Now I've implemented it using a timer and the power consumption is low as expected. Thank you again for your help.