Skip to content
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

Remove spin lock #1

Open
jpmeijers opened this issue Apr 24, 2023 · 1 comment
Open

Remove spin lock #1

jpmeijers opened this issue Apr 24, 2023 · 1 comment

Comments

@jpmeijers
Copy link

while ( true ) {} ; // Will not be executed

I had to remove this while(true) to allow the device to continue after shutdown. It is possible that something else in my setup is causing the cpu not to shut down - like the stlink that is plugged in. But leaving it here for others that might encounter the same issue.

@Edzelf
Copy link
Owner

Edzelf commented Apr 24, 2023

Strange, because the shutdown should cause a reset after the sleep period. So it looks like your device does not handle the shutdown well.
It has nothing to do with the ST-link. Mine is always connected during my tests. The power consumption drops to about 4 mA during shutdown (probably caused by the USB chip on the board).
Note that during sleep, flashing with ST-link will cause some problems. Press and hold the reset button, start the upload and release the button as soon as the LED on the ST-link starts to flash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants