-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BLE causes system sleep before main #41839
Comments
It seems that this problem is not STM32 specific. @jhedberg Would you mind having a look on BLE stack side? |
@erwango there is no PM related code on the host side of the Bluetooth stack, so not sure what you’re requesting. |
Sure, but maybe the point is that there are sleep intervals during BLE stack initialization that let the PM subsystem going into PM state while it should prevent it (using |
From the pm subsystem there is nothing preventing it from put the system to sleep. We can ensure that the system does not go to sleep before reach the |
This seems logical but:
|
@r2r0 I just had a debug session in this use case here are my observations:
I think what we're seeing is normal here, and not a bug.
This is actually our case here. Well, this is not a SMP but we do have a second core (M0), which is initialized during main core boot process (as part of ipm hci driver init). During M0 initialization, main core is waiting (a semaphore to released by a message coming from M0) and then idle thread is entered. This seems actually normal to me and I don't see a specific bug to fix here. What is strange is that I had a try to prevent to block idle entry (using |
Hi @erwango, constraints don't prevent the system to goes idle, they prevent the system of suspending, aka going to "deep" sleep. |
yep. I had removed the linkage between the pr and the issue, also removed the "fixes" from the commit message, but somehow the issue was automatically closed |
Ok, it is clear now to me that system behaior is correct. Thanks a lot for fast proceeding. |
Describe the bug
When the BLE subsystem is enabled (CONFIG_BT=y) then system enters idle thread (sleep) before main function is invoked.
Tested on blinky sample with CONFIG_BT=y and with small code changes as described below.
main.c
idle.c
Target (board) is nucleo_wb55rg.
To Reproduce
Steps to reproduce the behavior:
idle_entry: 2
Expected behavior
System should not sleep before entering main or this behavior should be documented.
Impact
annoyance
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: