Hello!
In our project we're using iMX8 Mini SoC, which is battery powered, and we're thinking about reducing sleep power usage. So far our SoC is being wake-up by M4 core, when readings from one of our sensors on board exceed threshold.
Now so far our M4 software is using pooling mode to read sensor data, which means M4 is always running. We came with idea to reduce M4 power usage by getting M4 to sleep and waking up M4 by GPIO line when sensor has new data triggers interrupt line.
But here's the problem. Our GPIO line is in GPIO1 bank, which is also used by Linux. So far, as we know, it's not possible to share interrupt lines between Linux and M4 (Is it?) But what about situation when Linux is sleeping?
We've did an experiment - we use pooling mode while linux is awake, and when it is preparing for sleep (we know that as we receive rpmsg about that) we're setting up GPIO line to have interrupt handler by M4 and we enable interrupts.
And here's something weird happen. Our M4 is running, but interrupt handler is being called few times and it's while Linux is preparing for sleep. After linux finally sleeps, no more interrupts being fired.
We suppose that this situation is something related with Linux GPIO preparation before it goes to sleep. Maybe some iMX driver re-setup GPIO registers?
We don't know, but if you could give me some clue where to start looking? Is it even possible at all to change ownership of interrupt handler?
Does the GPIOs being re-configured while preparing to sleep? If it is, by which module?
Thank you!