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

Call to SCB::sys_reset() results in locked up core. #938

Open
kareled opened this issue May 22, 2024 · 3 comments
Open

Call to SCB::sys_reset() results in locked up core. #938

kareled opened this issue May 22, 2024 · 3 comments

Comments

@kareled
Copy link

kareled commented May 22, 2024

Hello,
first of all, thanks a lot for the RTIC, it's amazing piece of code and technology!
I'm running it on stm32f4 and I'd like to enhance the application capability to be able to reset itself. Unfortunately simple:

cortex_m::peripheral::SCB::sys_reset();

results in following output from the probe-rs:

ERROR probe_rs::architecture::arm::core::armv7m: The core is in locked up status as a result of an unrecoverable exception

and the app/platform/mcu is not reset properly.
I've verified that if I just go without RTIC using stm32f4xx_hal & co, then sys_reset works like a charm. But not with RTIC. My RTIC app is around 15 user tasks and few hardware tasks and is using rtic monotonic and also rtic sync for channel communication.
Do you have any idea where should I look to debug this failure? Looks like I'm even not able to get hard fault frame for whatever reason...
Thanks!

@glaeqen
Copy link
Contributor

glaeqen commented May 22, 2024

I assume you did try but it's not 100% clear to me from the phrasing: have you tried to make an empty RTIC application to reset itself or with all your user-code? Have you tried resetting your MCU by pulling the RST pin down and seeing if the behaviour is different?

@kareled
Copy link
Author

kareled commented May 22, 2024

Indeed, this is an homework I still need to do. E.g. complex RTIC app runs on custom board without any support for RST pin while my "duplication" of sys_reset working with just f4 hal was done on nucleo board with comfortable RST button if needed.
Anyway, I'll make simple RTIC app for nucleo and will report back if sys_reset works or not there...

@glaeqen
Copy link
Contributor

glaeqen commented May 22, 2024

Ok! FYI, RTIC has it's own official Matrix channel where you can pop-in and ask questions to the wider audience if you want :)

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