To preserve energy, we’d like to put the whole system asleep except for the auxiliary Cortex who would monitor an analog signal, and wake up the other cores + peripherals when a certain threshold is reached on the analog input.
Any examples for how to achieve this?
Yes it’s possible though we don’t have a particular example. There are four interrupt lines from the K20 MCU to the TK1 SoC so you can use any of them to wake up a TK1. Please refer to Apalis TK1 datasheet (https://docs.toradex.com/103129-apalis-tk1-datasheet.pdf), Using K20 Companion MCU on Apalis TK1 and Possible to run K20 while TK1 is shutdown? - Technical Support - Toradex Community
Please be aware - there is no level shifter between
the two controllers. The SoC pins are only 1.8V capable while all K20 pins do have 3.3V logic
level. Therefore, it is very important to configure the interrupt pins correctly on both sides. The
interrupt output pins of the MCU need to be configured as open drain output without enabling the
internal pull up resistors. The pull-up resistors need to be enabled at the SoC input since they are
pulling up the signal to just 1.8V.