Tool/software:
The device goes to sleep after a certain timeout caused by lack of LIN communication and is woken up via pin wakeup (falling edge if it matters). Without communication it will go back to sleep. Sometimes (4-10 of these cycles), the device will not switch off VCC. It appears that the device itself is in sleep mode (will react to pin wakeup event and go to sleep normally after the timeout) but the power supply stays on. This does not happen with wake requests sent on the LIN bus. The code to send the device to sleep is the same for both, a simple SPI write. The interrupt line is not pulled low with all the interrupts configured active. What could be causing such a behaviour?