-
Notifications
You must be signed in to change notification settings - Fork 3k
Wait() function causes system to hang on STM32F0(91RC) #9106
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
Comments
Hi quick question:
Does it mean it was working with 5.10.3 ? |
I don't know about that, but I know the online compiler behaves differently because it seems to use mbed2. |
|
Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-321 |
I located the error to be in the debug profile. When I build the project with the develop profile it is working. But not when flashing with the debug profile. |
The thing that immediately sprints to mind is that deep sleep is disabled by the mbed-os/hal/mbed_sleep_manager.c Line 211 in b9927e5
|
But I don't think deep sleep is used as TICKLESS has not been enabled. |
I'm not totally sure what you would like me to try. But I changed But I don't think that's what you meant, and it didn't help. |
Ah, as Jerome said, if If the error is solid, and you have an version that it worked on, maybe go back to git bisect to find the mbed OS commit that broke it? |
At the moment I build using the develop profile, that way I can't debug, but the mbed functions do work. |
I tested version 5.11.0 but no succes yet. |
@jeromecoutant This is one of the Mbed Enabled boards? Could you please look at the issue? |
The mbed-os error explicitly reports a "Stack overflow" and the stack size seems to be 0x200 (while main default stack size is often 0x4000). Has the default stack size been strongly reduced / optimized in recent releases ? Or the interrupt stack size ? |
#8956 was not part of 5.11.0 |
@geobruce - Other error reported is stack overflow, and stack size is 0x200 which is for Idle thread. |
With "-DMBED_TRAP_ERRORS_ENABLED=1"], set to "-DMBED_TRAP_ERRORS_ENABLED=0"], no success, It doesn’t work still same serial output “test0” and nothing more.
When I change the stack size from 512 of the idle thread to 1024 it does work and I’m able to execute the code step by step.
Van: Deepika Bhavnani <[email protected]>
Verzonden: woensdag 30 januari 2019 6:44
Aan: ARMmbed/mbed-os <[email protected]>
CC: geobruce <[email protected]>; Mention <[email protected]>
Onderwerp: Re: [ARMmbed/mbed-os] Wait() function causes system to hang on STM32F0(91RC) (#9106)
@geobruce<https://github.com/geobruce> - Debug profile has MBED_TRAP_ERRORS_ENABLED flag enabled, can you disable that and see if wait works in debug profile?
https://github.com/ARMmbed/mbed-os/blob/master/tools/profiles/debug.json#L33
Other error reported is stack overflow, and stack size is 0x200 which is for Idle thread.
In case of wait() call, if no other thread is ready, idle thread will be executed which is the case with blinky application.
Please try increasing the stack size of idle thread to 0x400, and note if blinky works in debug profile without any changes in profile.
https://github.com/ARMmbed/mbed-os/blob/master/rtos/mbed_lib.json#L15
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#9106 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AErciFj36gAr2v_XSws39wRfEQmgZf0cks5vITEEgaJpZM4ZTcse>.
|
@jeromecoutant - The fix was requested from ST team to reduce the stack usage for deep sleep, will like to know if any updates on that? |
Hi
|
Description
The “simple mbed blinky program” does not work on the NUCLEO-F091RC when using latest mbed-os-5.10.4 .
The problem occurs when using the wait function. The program compiles but when flashed the delay is not working and halts the microcontroller. This problem occurs with all possible mbed wait functions.
The problem seems similar to an earlier “bug” #1494 for and older version of mbed, maybe it is the same problem again.
When I leave the wait function commented, the program runs and I can slow the program down with:
So I’m pretty sure my toolchain is configured correctly and there might be something wrong with the libraries.
I was able to get this "error report" from the "serial monitor (putty)" when I discovered the problem with the wait function when I was using a different program. But the problem is already visible by running the blinky program.
Issue request type
The text was updated successfully, but these errors were encountered: