Hello Paul,
I tried to repeat the manually what your routine I guess it does and I wasn't able to experience the behaviour you described.
I can only guess the reason is the custom HAL
Sorry for not being more helpful.
I would like to know what BackgroundHALShouldPause does, and how to use it. While it's listed in the HAL Primitives report, it is not used in source code and it doesn't appear in the LMS HAL...