Skip to content

Add missing free function to lp and us ticker HAL APIs #5856

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 Jan 26, 2018
Merged

Add missing free function to lp and us ticker HAL APIs #5856

merged 2 commits into from Jan 26, 2018

Conversation

ghost
Copy link

@ghost ghost commented Jan 15, 2018

Description

The current HAL specification for tickers does not provide a method to disable them, which is an issue for low power mode. This PR adds free functions similar to that defined in the RTC HAL API to both the us ticker and lp ticker APIs.

Status

IN DEVELOPMENT

Migrations

NO

Todos

  • Add function declaration to HAL header files
  • Add support for boards currently using the API.

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 16, 2018

Does this need to go to feature branch and have all targets implemented?

If this API is defined, shouldn't be used somewhere? Us ticker is always running at the moment (overflow to count 64bit timestamp) - how does this work with this extension?

Shall lp ticker be disabled?

@0xc0170 0xc0170 requested review from bulislaw and c1728p9 January 16, 2018 10:28
@ghost ghost changed the base branch from master to feature-hal-spec-ticker January 16, 2018 10:37
@ghost ghost changed the base branch from feature-hal-spec-ticker to master January 16, 2018 10:38
@ghost
Copy link
Author

ghost commented Jan 16, 2018

It should go to the ticker feature branch until it's implemented on the necessary boards.

The tickers should stop counting after being freed if they were initialised, I'm not certain of the behaviour yet if multiple tickers rtc/us/lp are running and share the same counter.

Copy link
Member

@bulislaw bulislaw left a comment

Choose a reason for hiding this comment

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

I think you need to rebase your code on top of the rtos ticker branch and update the undefined behaviour section on the beginning of the header.

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 22, 2018

@scartmell-arm Please advice what is the destination branch, still points to master - seems incorrect.

@ghost ghost changed the base branch from master to feature-hal-spec-ticker January 22, 2018 13:58
@0xc0170 0xc0170 force-pushed the feature-hal-spec-ticker branch from a2a3aab to 2ae20ca Compare January 23, 2018 14:34
@0xc0170
Copy link
Contributor

0xc0170 commented Jan 24, 2018

@scartmell-arm Can you rebase please after changing the destination branch?

@pan-
Copy link
Member

pan- commented Jan 24, 2018

Could you explain how and when the ticker free function is supposed to be used ?

A module calling us_ticker_free after it's use of the us_ticker may interfere with other parts of the application that are currently using the peripheral.

@bulislaw
Copy link
Member

We are adding way of powering things off to all HAL APIs, the driver will need to figure out how to use it. I'm not sure it will be possible to do for all the drivers for Mbed OS 5, due to backward compatibility requirements. As for us ticker I don't want it being used by Mbed OS if we can avoid it, therefore it will be up to the user to manage it's lifetime.

@cmonr
Copy link
Contributor

cmonr commented Jan 25, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Jan 25, 2018

Build : SUCCESS

Build number : 958
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5856/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build

@mbed-ci
Copy link

mbed-ci commented Jan 25, 2018

@mbed-ci
Copy link

mbed-ci commented Jan 26, 2018

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 26, 2018

/morph uvisor-test

@cmonr cmonr merged commit b57f60e into ARMmbed:feature-hal-spec-ticker Jan 26, 2018
@ghost ghost deleted the feature-hal-ticker-free branch December 5, 2018 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants