-
Notifications
You must be signed in to change notification settings - Fork 7k
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
nRF52: MPU Fault issue #10055
Comments
Have you verified that this is not because of some too small thread stack? You should check all threads, but the two most likely culprits are the Bluetooth RX thread and the system workqueue thread. It's not really worth investigating this further until stack overflow has been excluded as a potential cause. |
CONFIG_MAIN_STACK_SIZE=512 ......set to 1024 even after that getting MPU_FAULT. If stack size is issue then it should also get replicate in case of 1.12.99 ...but it is not like that. There are some commit which are related to MPU after ba6763a which may be cause of it. May be there is bug in App itself ..but then how it is working with v1.12.99 ? |
There are many aspects of the system that can cause an increase stack consumption. You didn't mention the Bluetooth RX stack size. Why not? I'd recommend setting both it and the system workque to 4k. The Kconfig option for the RX stack is |
Now I've set CONFIG_INIT_STACKS=y For other configuration, please refer After that I got following log ....
|
Is it because of adv_stack ? |
@Vikrant8051 this does looks suspicious. Can you try increasing that one? |
I simply copy & paste this app from 1.13 to v1.12.99
But that does't cause any MPU_FAULT. @carlescufi I will increase it & re-check. |
@carlescufi I set it to 1024 but no effect.
|
It looks like we try to execute from SRAM. |
Hello @ioannisg, |
I have no idea. All I see by inspecting the fault dump is that:
@jhedberg @carlescufi some debugging, here, might be needed, IMHO. @Vikrant8051 (could you enable MPU_STACK_GUARD) and see if you get stack overflow? |
CONFIG_MPU_STACK_GUARD=y after enabling this, on reset getting following fault.... ***** Booting Zephyr OS zephyr-v1.13.0-152-g6770919e7 ***** |
After some testing with onboard buttons, get following log on terminal ..... (buttons suddenly stop publishing ).... power-> 100, color-> 18 |
@Vikrant8051 could you please try this for us:
And run the test again. |
Could you try to bisect?
Then test each revision presented to you by
until Git tells you which commit is responsible for the error. |
@carlescufi
|
Hooray, finally bug has found. |
@Vikrant8051 thank you for testing this. CC @nashif |
Will investigate. Pretty sure the handling is correct now, but the problem was subtle and I might have messed something up... |
there is a possible fix in a PR already |
@nashif @carlescufi @andyross |
Hi,
This zephyr/samples/boards/nrf52/mesh/onoff_level_lighting_vnd_app App in latest master branch
works perfectly normal with Zephyr v1.12.99 (with last commit ba6763a).
But with latest master branch or after v1.13 onward, I am facing issue of MPU FAULT intermittently.
If we set "LIGHT_CTL_TT" in publisher.c & configure buttons to publish Light CTL set (acknowledged) messages then it get easily encountered while playing with on-boards buttons on #nRF52840_PDK boards.
The text was updated successfully, but these errors were encountered: