Skip to content
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

NUCLEO-F446RE hard faults when having sleep tracing enabled #10051

Closed
janjongboom opened this issue Mar 12, 2019 · 6 comments
Closed

NUCLEO-F446RE hard faults when having sleep tracing enabled #10051

janjongboom opened this issue Mar 12, 2019 · 6 comments

Comments

@janjongboom
Copy link
Contributor

janjongboom commented Mar 12, 2019

Description

Verified on Mbed OS 5.11.5. On the NUCLEO-F446RE the board hard faults almost immediately when enabling sleep tracing:

Sleep locks held:
Sleep locks held:
Sleep locks held:
Sleep locks held:
Sleep locks held:
Sleep locks held:
Sleep locks held:
Sleep locks held:
LOCK: Ticker.cpp, ln: 61, lock count: 1
UNLOCK: Ticker.cpp, ln: 32, lock count: 0
LOCK: Ticker.cpp, ln: 61, lock count: 1
UNLOCK: Ticker.cpp, ln: 32, lock count: 0
LOCK: mbed_rtx_idle.cpp, ln: 100, lock count: 1
UNLOCK: mbed_rtx_idle.cpp, ln: 122, lock count: 0
++ MbedOS Error Info ++
Error Status: 0x80020125 Code: 293 Module: 2
Error Message: CMSIS-RTOS error: Stack overflow
Location: 0x8002239
Error Value: 0x1
Current Thread: rtx_idle  Id: 0x200011E4 Entry: 0x800220D StackSize: 0x300 StackMem: 0x20001528 SP: 0x2001FF3C 
For more info, visit: https://armmbed.github.io/mbedos-error/?error=0x80020125
-- MbedOS Error Info --

My application:

#include "mbed.h"
#include "mbed_stats.h"

static DigitalOut led(LED1);

void print_stats()
{
    mbed_stats_cpu_t stats;
    mbed_stats_cpu_get(&stats);
}

int main() {
    while (1) {
        mbed_stats_cpu_t stats;
        mbed_stats_cpu_get(&stats);
        printf("Uptime: %llu ", stats.uptime);
        printf("Idle: %llu ", stats.idle_time);
        printf("Sleep time: %llu ", stats.sleep_time);
        printf("Deep Sleep: %llu\n", stats.deep_sleep_time);

        led = !led;
	    printf("LED is %d\n", led.read());

        // print_stats();
        wait_ms(2000);
    }
}

My mbed_app.json:

{
    "macros": [
        "MBED_TICKLESS=1",
        "MBED_CPU_STATS_ENABLED=1",
        "MBED_SLEEP_TRACING_ENABLED=1"
    ]
}

Issue request type

[ ] Question
[ ] Enhancement
[X] Bug
@ciarmcom
Copy link
Member

Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-989

@screamerbg
Copy link
Contributor

@linlingao There are several topics related to TICKLESS and sleep issues, some of which are related to Mbed OS - #10085, #10079, #10080. Could we remove the "devices: st" label until there is clarity about the issues inside Mbed OS with tickless and sleep, as this may end up being Mbed OS problem, not ST problem?

@jeromecoutant
Copy link
Collaborator

until there is clarity about the issues inside Mbed OS with tickless and sleep, as this may end up being Mbed OS problem

It seems that this issue is not assigned to anybody yet ?

@linlingao
Copy link
Contributor

@jeromecoutant The issue has been assigned to the HAL team.

@LMESTM
Copy link
Contributor

LMESTM commented Jun 21, 2019

#10702 and #10781 may solve this issue.

@jeromecoutant
Copy link
Collaborator

I think we could close this one ?
Thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants