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

Remove ticker interface initialization while Ticker creation. #6076

Merged
merged 1 commit into from Feb 20, 2018

Conversation

Projects
None yet
5 participants
@mprse
Member

mprse commented Feb 13, 2018

Description

Ticker constructor calls directly target specific ticker init function. Currently there is no problem, since ticker interface initialization functions are protected against multi-calls and simply returns if not called for the first time (interface initialization can be performed only once). According to the new Thicker HAL API requirements:

The function ticker_init allows the ticker to keep counting and disables the ticker interrupt.

Disabling interrupts while some Ticker interrupts are already scheduled for sure will destroy the schedule. Ticker interface should be initialized only here:

ticker->interface->init();

This function is protected against multi-calls and ensures that ticker interface will be initialized only once.

Status

READY

Migrations

NO

Related PRs

List related PRs against other branches:

branch PR
ARMmbed:feature-hal-spec-ticker https://github.com/ARMmbed/mbed-os/pull/6052
ARMmbed:feature-hal-spec-ticker https://github.com/ARMmbed/mbed-os/pull/5629
Remove ticker interface initialization while Ticker creation.
Ticker constructor calls directly target specific ticker init function. Currently there is no problem, since ticker interface initialization functions are protected against multi-calls and simply returns if not called for the first time (interface initialization can be performed only once). According to the new Thicker HAL API requirements:
The function ticker_init allows the ticker to keep counting and disables the ticker interrupt.

Disabling interrupts while some Ticker interrupts are already scheduled for sure will destroy the schedule. Ticker interface should be initialized only once and it is already done by: static void initialize(const ticker_data_t *ticker) function in /m-bed/hal/mbed_ticker_api.c file.
@0xc0170

This comment has been minimized.

Member

0xc0170 commented Feb 13, 2018

destination branch master rather than quoted ticker feature branch?

@mprse

This comment has been minimized.

Member

mprse commented Feb 13, 2018

destination branch master rather than quoted ticker feature branch?

I think that this one can go on master since new version of the mbed ticker hal API is also on master (/m-bed/hal/mbed_ticker_api.c).

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Feb 13, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Feb 13, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@mprse

This comment has been minimized.

Member

mprse commented Feb 19, 2018

@bulislaw @c1728p9 ping for review.

@cmonr cmonr merged commit cd7595e into ARMmbed:master Feb 20, 2018

17 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
mbed-ci-generic Build finished.
Details
travis-ci/docs/ Local docs testing has passed
Details
travis-ci/events/ Local events testing has passed
Details
travis-ci/littlefs/ Local littlefs testing has passed
Details
travis-ci/mbed2-ATMEL/ Local mbed2-ATMEL testing has passed
Details
travis-ci/mbed2-MAXIM/ Local mbed2-MAXIM testing has passed
Details
travis-ci/mbed2-NORDIC/ Local mbed2-NORDIC testing has passed
Details
travis-ci/mbed2-NUVOTON/ Local mbed2-NUVOTON testing has passed
Details
travis-ci/mbed2-NXP/ Local mbed2-NXP testing has passed
Details
travis-ci/mbed2-SILICON_LABS/ Local mbed2-SILICON_LABS testing has passed
Details
travis-ci/mbed2-STM/ Local mbed2-STM testing has passed
Details

@cmonr cmonr removed the ready for merge label Feb 20, 2018

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