Resolved! Why does my STM32L5 peripheral clock keep running in stop 2 mode
I am using an STM32L552ZE (it is in fact the nucleo version). After carefully reading the manual and looking at some example code from the STM32 Cube IDE, I came to the conclusion that this code is what I need to enter stop 2 mode with Wait For Event...