Sub-IoT-Stack
                                
                                 Sub-IoT-Stack copied to clipboard
                                
                                    Sub-IoT-Stack copied to clipboard
                            
                            
                            
                        RTT Logging does not work well with Sleep
See: https://groups.google.com/g/dash7-ap-oss/c/uWwnjiImqQM/m/GCZKSORVAQAJ
This is indeed a known issue with the RTT Logging. When it goes to sleep, it can repeat some logging. You can circumvent this issue by using FRAMEWORK_SCHEDULER_LP_MODE=255. This mode will actually keep the processor active at all times and logging will be very responsive and will not repeat itself. However, your program can react differently as it's not going to sleep and your power consumption will be a lot higher so this is purely for debugging
RTT v2.54 (November 2019) added SEGGER_RTT_GetAvailWriteSpace() - which, perhaps, could be used to defer sleeping until all logs have been sent?
See also: https://community.st.com/s/question/0D53W000014wcE5SAI/how-to-get-segger-rtt-to-work-with-sleep-modes-on-stm32