Skip to content

Cypress: us_ticker fixes #13130

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

Merged
merged 2 commits into from
Jun 17, 2020
Merged

Conversation

kyle-cypress
Copy link

Summary of changes

  • Explicitly disable the timer used for the us_ticker before attempting to enter DeepSleep.
    A running timer will block DeepSleep, which would normally be good because we don't want the timer to accidentally lose counts. We don't care about that for us_ticker (If we're requesting deepsleep the upper layers already determined that they are okay with that), so explicitly stop the us_ticker timer before we go to sleep and start it back up afterwards.
  • Add optional post-bsp-init hook
    This allows the application to inject its own resource reservations immmediately after the BSP (and therefore HAL) is initialized, ensuring that they can claim require resources before mbed tries to use them for more flexible purposes. For example, the application might want to claim a particular timer to make sure that it doesn't get picked for us_ticker (which can use any arbitrary timer instance).

Impact of changes

NA

Migration actions required

NA

Documentation

NA


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[x] Tests / results supplied as part of this PR

All failures are either transient or pre-existing
CY8CPROTO_062S3_4343W_GCC_ARM-NET.txt
CY8CPROTO_062S3_4343W-GCC_ARM.txt
CY8CKIT_062_WIFI_BT-GCC_ARM.txt
CY8CKIT_062_WIFI_BT-GCC_ARM-NETWORK.txt
CY8CPROTO_062_4343W_GCC_ARM-NET.txt
CY8CPROTO_062_4343W-GCC_ARM.txt


Reviewers

@ARMmbed/team-cypress


Kyle Kearney added 2 commits June 16, 2020 11:07
A running timer will block DeepSleep, which would normally be
good because we don't want the timer to accidentally lose counts.
We don't care about that for us_ticker (If we're requesting deepsleep
the upper layers already determined that they are okay with that),
so explicitly stop the us_ticker timer before we go to sleep and
start it back up afterwards.
This allows the application to inject its own resource reservations
immmediately after the BSP (and therefore HAL) is initialized,
ensuring that they can claim require resources before mbed tries
to use them for more flexible purposes. For example, the application
might want to claim a particular timer to make sure that it doesn't
get picked for us_ticker (which can use any arbitrary timer instance).
@ciarmcom
Copy link
Member

@kyle-cypress, thank you for your changes.
@maclobdell @ARMmbed/mbed-os-maintainers please review.

@ciarmcom ciarmcom requested review from maclobdell and a team June 17, 2020 03:00
Copy link
Contributor

@kjbracey kjbracey left a comment

Choose a reason for hiding this comment

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

Makes sense to me. I like the justification for "post-bsp init" hook better than the equivalent hook when it was put in for STM - there was a vague idea about it being for "extra RAM init" then, which wouldn't really work.

@mergify mergify bot added needs: CI and removed needs: review labels Jun 17, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Jun 17, 2020

Makes sense to me. I like the justification for "post-bsp init" hook better than the equivalent hook when it was put in for STM - there was a vague idea about it being for "extra RAM init" then, which wouldn't really work.

cc FYI @ARMmbed/team-st-mcd

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 17, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Jun 17, 2020

Test run: SUCCESS

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

@0xc0170 0xc0170 added the release-type: patch Indentifies a PR as containing just a patch label Jun 17, 2020
@0xc0170 0xc0170 merged commit 28b7cf3 into ARMmbed:master Jun 17, 2020
@mergify mergify bot removed the ready for merge label Jun 17, 2020
@adbridge adbridge added release-version: 6.1.0 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Jun 24, 2020
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