Hello,
I have a custom IMX8ULP device with Yocto installed. After bootup, the power meter shows a power consumption of 0.08 A @5V.
I have written an application which accesses an image sensor, connected via MIPI and controlled via I2C. When running the application, the power consumption increases as expected. The strange thing is that after closing my app, it drops down to 0.12 A and never goes back to the 0.08A, it only does when I reboot the device. This behavior can be reproduced each time I run my app.
Are there any ideas how I can debug that issue? Some component seems to be not correctly unpowered. How can I find out which one?
My first idea was that the camera is somehow still powered. Since my app is shut down, it could only be the case if the driver does not completely deinitialize the camera. As a test, directly after boot, I run the camera from command line using v4l2-ctl to capture several images. After shutting it down, the power consumption goes back to 0.08A, so everything seems fine here.
In that situation after running my app:
* my application is totally shut down
* CPU use is 0%
* bus frequency is in LowPowerMode (similar to after bootup), checked in file /sys/devices/platform/imx8ulp-lpm/enable
* CPU frequency control: CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is enabled (as seen by zcat /proc/config.gz | grep CPU_FREQ)
The board has almost no peripherals, except the image sensor and a USB connection (no ethernet, wifi, blutooth, DSI, etc).
Thanks for any help.