what u used is not idle task , it is some import on startup
NewPeriodicTask should be used for example OnApplicationStartupComplete
and there are more things to consider there
and creating 20000 items will take time ......
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...