Skip to content

K64F lp ticker driver - calculation bug fix. #6055

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 1 commit into from
Feb 20, 2018

Conversation

mprse
Copy link
Contributor

@mprse mprse commented Feb 9, 2018

Description

Issue with interrupt scheduling has been found while working on PR #6052.

Delta calculation from lp_ticker_set_interrupt() function:

delta_us = timestamp > now_us ? timestamp - now_us : (uint32_t)((uint64_t)timestamp + 0xFFFFFFFF - now_us);

Lets assume that timestam == now_us.
Expected delta value should be 0 and in this current version is 0xFFFFFFFF.

The following condition:
timestamp > now_us
should have the following form:
timestamp >= now_us

Additionally modified us ticker driver to provide the same logic.

Status

READY

Migrations

NO

Delta calculation from lp_ticker_set_interrupt() function:
delta_us = timestamp > now_us ? timestamp - now_us : (uint32_t)((uint64_t)timestamp + 0xFFFFFFFF - now_us);

Lets assume that timestam == now_us.
Expected delta value should be 0 and in this current version is 0xFFFFFFFF.

The following condition:
timestamp > now_us
should have the following form:
timestamp >= now_us

Additionally modified us ticker driver to provide the same logic.
@0xc0170
Copy link
Contributor

0xc0170 commented Feb 12, 2018

@ARMmbed/team-nxp Please review

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 12, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Feb 12, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci
Copy link

mbed-ci commented Feb 12, 2018

@mprse
Copy link
Contributor Author

mprse commented Feb 13, 2018

Can we run morph test here again - looks like previous one was canceled.

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 13, 2018

/morph test

@mbed-ci
Copy link

mbed-ci commented Feb 13, 2018

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.

4 participants