-
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
initializing UARTserial leads to error when SLEEPTRACE enabled #12593
Comments
@CodingGhost thank you for the update.It appears however that there is still some missing information: Could you add some more detail to the description? A good description should be at least 25 words. NOTE: If there are fields which are not applicable then please just add 'n/a' or 'None'.This indicates to us that at least all the fields have been considered. |
Internal Jira reference: https://jira.arm.com/browse/MBOTRIAGE-2582 |
What is the callstack (code flow in this case) ? Looking at the code flow for UARTSerial ctor, I suspect there is critical section invoked and mutex being accessed when tracing is enabled. We will have a closer look. |
Looks like a duplicate of #11497, the call stack is a bit different though:
|
It does not seem to be purely related to #include "mbed.h"
#define WAIT_TIME_MS 500
DigitalOut led1(LED1);
int main()
{
printf(str);
while (true)
{
led1 = !led1;
thread_sleep_for(WAIT_TIME_MS);
}
} I built and flashed with the following: My {
"target_overrides": {
"*": {
"target.c_lib": "small",
"target.printf_lib": "minimal-printf",
"platform.minimal-printf-enable-floating-point": false,
"platform.stdio-minimal-console-only": true,
"target.macros_add": ["MBED_SLEEP_TRACING_ENABLED"]
}
}
} I am using |
When the kernel is initialised, the millisecond ticker is started and a timing This issue is not visible with non-STM boards because they do not use sleep |
Description of defect
when "MBED_SLEEP_TRACING_ENABLED" Macro is defined, initializing UARTserial leads to an MBEDOS "Not allowed in ISR context" fault.
It is enough to just initialize it with a given baudrade (I tested with 9600) to reproduce this issue.
Target(s) affected by this defect ?
NRF5x Cordio
(maybe more?)
Toolchain(s) (name and version) displaying this defect ?
PlatformIO 4.2.1
What version of Mbed-os are you using (tag or sha) ?
5.14.1
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
PlatformIO 4.2.1
How is this defect reproduced ?
UARTSerial *ser = NULL; ser = new UARTSerial(P0_6,P0_8,9600);
add "MBED_SLEEP_TRACING_ENABLED" macro.
The text was updated successfully, but these errors were encountered: