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

Fix for Issue #7308 (Deep_sleep_lock Ticker.h Issue) #9483

Merged
merged 1 commit into from
Jan 29, 2019

Conversation

mprse
Copy link
Contributor

@mprse mprse commented Jan 24, 2019

Description

Provide fix for issue #7308.

Code used to reproduce the issue:

void test()
{
    Ticker ticker;

    ticker.attach_us(callback(stop_gtimer_set_flag), 1000);
    while (!ticker_callback_flag);
    ticker.detach();
}

Test has been built with MBED_SLEEP_TRACING_ENABLED flag. Usage of Ticker should result in locking deep sleep.

Results on master without fix:

[1548322380.64][CONN][INF] found KV pair in stream: {{__testcase_name;Test}}, queued...
[1548322380.71][CONN][RXD] >>> Running case #1: 'Test'...
[1548322380.78][CONN][INF] found KV pair in stream: {{__testcase_start;Test}}, queued...
-> [1548322380.83][CONN][RXD] LOCK: Ticker.h, ln: 125, lock count: 1
-> [1548322380.89][CONN][RXD] Unlocking sleep for driver that was not previously locked: Ticker.cpp, ln: 32
[1548322380.97][CONN][INF] found KV pair in stream: {{__testcase_finish;Test;1;0}}, queued...

Results with this fix:

[1548322463.11][CONN][INF] found KV pair in stream: {{__testcase_name;Test}}, queued...
[1548322463.18][CONN][RXD] >>> Running case #1: 'Test'...
[1548322463.24][CONN][INF] found KV pair in stream: {{__testcase_start;Test}}, queued...
-> [1548322463.28][CONN][RXD] LOCK: Ticker.cpp, ln: 61, lock count: 1
-> [1548322463.32][CONN][RXD] UNLOCK: Ticker.cpp, ln: 32, lock count: 0
[1548322463.39][CONN][INF] found KV pair in stream: {{__testcase_finish;Test;1;0}}, queued...

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

@ciarmcom ciarmcom requested review from a team January 24, 2019 10:00
@ciarmcom
Copy link
Member

@mprse, thank you for your changes.
@ARMmbed/mbed-os-core @ARMmbed/mbed-os-maintainers please review.

Copy link

@deepikabhavnani deepikabhavnani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :+

@cmonr
Copy link
Contributor

cmonr commented Jan 28, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Jan 28, 2019

Test run: SUCCESS

Summary: 12 of 12 test jobs passed
Build number : 1
Build artifacts

@0xc0170 0xc0170 merged commit d1b367f into ARMmbed:master Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants