Hello,
You're referring two different use case implementation, for the use case that you want I would suggest to follow AN13400.
In this app note everything you need to know is explained and the how to, some of the chapters that you may want to check are:
4.3 Make the M core alive when the A core is in Suspend mode
4.3.2 Method 2: Define LPA flags in the M core application
5.5.5.1 Check modules’ root clocks in the kernel
Best regards/Saludos,
Aldo.