-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Nuvoton: Fix NUC472 hard fault in SMCC tests #9171
Conversation
@@ -75,6 +75,8 @@ void CLK_PowerDown(void) | |||
SCB->SCR = SCB_SCR_SLEEPDEEP_Msk; | |||
CLK->PWRCTL |= (CLK_PWRCTL_PDEN_Msk | CLK_PWRCTL_PDWKDLY_Msk ); | |||
__WFI(); | |||
__DSB(); | |||
__ISB(); |
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.
why are these barriers after and not before WFI - why it was hardfaulting previously?
I am missing what has caused the hardfault (how these 2 barriers are adressing it), adding them after _WFI is executed
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.
@0xc0170 , according to the hard fault prompt & tracking, it's failed in branch instruction after wake-up. So add these barriers to ensure data & instruction ready before branch. Cross checking of my test proved it could work as our expectation.
@cyliangtw, thank you for your changes. |
This is great! Thank you @cyliangtw for your hard work to get to the bottom of the issue and resolve it! |
This may need another review before going in, but starting CI in the mean time |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
@NirSonnenschein could you clarify? This appears to be good to go. |
should be good to go, a question came up regarding additional reviews. |
Description
This PR is to fix NUC472 hard fault what Mihail Stoyanov found in SMCC connect or update tests.
Test by pelion-enablement repo with
mbed test -t ARM -m NUMAKER_PFM_NUC472 -n simple-mbed-cloud-client-tests-dev_mgmt-* --run -v
Pull request type
Test log:
Reviewers
@MarceloSalazar
@samchuarm