-
Notifications
You must be signed in to change notification settings - Fork 72
Docs: Fix sample code for debug box #400
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
Docs: Fix sample code for debug box #400
Conversation
Fixes: * ARMmbed#392: "A quick change in debugging documentation"
Patater
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@Patater added clarification regarding reboot from a debug box handler. |
| /* Remember that debug_deprivilege_and_return() has been called once. | ||
| * We'll reboot after the debug handler is run, so this will go back to | ||
| * zero after the reboot. */ | ||
| /* Remember that debug_deprivilege_and_return() has been called once. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps note that the debug box can only be entered once, to avoid the debug box calling itself recursively. This is probably important enough to go into the documentation (not just comments) as well, as this limits what you can do after the debug box runs before you have to reboot. For instance, you can't catch a fault and then restart that box and catch a subsequent fault; you get one debug box entry per boot. This means you pretty much have to reboot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with improved docs before the code snippet (the comment has not been changed).
A handler registered to the debug box does not cause the system to reboot any more. By default, the system is halted, instead. A user can still request that the system reboots from within a debug box handler, by calling the `NVIC_SystemReset()` API. This API can only be called by the debug box when uVisor is enabled.
a6f13de to
052f6a3
Compare
Patater
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes:
@niklas-arm @Patater
Thanks @asensaoui @janjongboom for also reporting this.