Hello,
If I understand you completely, you implemented the code in bare metal in an application without the wireless connectivity framework and your code works correctly, but when using the same code in the Bluetooth LE examples it does not work correctly, could you please confirm if my understanding it's correct?
Are you sure you are not blocking the scheduler with something in your implementation?
Are you using the evaluation kit for this development? Are you considering that when the OSCCLK, the 32 MHz or 26 MHz crystal or external clock from EXTAL/XTAL, which serves as the Radio clock, is used as KW41 system clock, the RSIM_CONTROL[STOP_ACK_OVRD] bit should be set to avoid STOP/VLPS/LLSx/VLLSx mode entrance failure, could you please check those details ?