Skip to content

tests-mbed_hal-common_tickers / lp ticker speed test : remove set_interrupt call loop #6459

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

Conversation

jeromecoutant
Copy link
Collaborator

Description

There is some issue when lp_ticker_set_interrupt function is called into a loop with no delay between.

NB: extract of STM32 reference manual (in chip supporting LPTIM feature):
After a write to the LPTIM_ARR register or the LPTIM_CMP register, a new write operation
to the same register can only be performed when the previous write operation is completed.
Any successive write before respectively the ARROK flag or the CMPOK flag be set, will
lead to unpredictable results.

After dicussion, we decide to remove the loop and check requirement time during an unique call

@LMESTM @c1728p9 @sg- @bulislaw

Additional question:
is there really a sense to define the same requirement for ticker_set_interrupt time completion for usticket and lpticker ?

Pull request type

[X] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 26, 2018

@bulislaw @c1728p9 Can you review PR head issue? some tests do not build (lp timeout) due to some recent changes (rebase?), does not look related to this changeset

@jeromecoutant
Copy link
Collaborator Author

some tests do not build (lp timeout) due to some recent changes (rebase?)

yes, DEVICE_LOWPOWERTIMER #if has not been updated in TESTS\mbed_drivers\timeout\timeout_tests.h

@bulislaw bulislaw force-pushed the feature-hal-spec-ticker branch from afd66ab to 6daa7fc Compare March 27, 2018 14:06
@jeromecoutant jeromecoutant force-pushed the PR_COMMON_TEST_UPDATE branch from b6ccb77 to c409825 Compare March 30, 2018 12:37
@jeromecoutant
Copy link
Collaborator Author

Rebase done

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 3, 2018

/morph build

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 3, 2018

Still waiting for the review.

After a write to the LPTIM_ARR register or the LPTIM_CMP register, a new write operation
to the same register can only be performed when the previous write operation is completed.

Based on the description above, I would expect the target implementation handles the case (wait for completion of the command) ?

@mbed-ci
Copy link

mbed-ci commented Apr 3, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci
Copy link

mbed-ci commented Apr 3, 2018

@mbed-ci
Copy link

mbed-ci commented Apr 4, 2018

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 4, 2018

After dicussion, we decide to remove the loop and check requirement time during an unique call

@c1728p9 Is this correct? Even with your latest ticker updates, is this PR still valid?

@LMESTM If we remove, we remove the lines, not commented out.

@LMESTM
Copy link
Contributor

LMESTM commented Apr 4, 2018

@0xc0170 Jerome (@jeromecoutant) is the one to remove lines instead of commenting out.
and yes, driver will make sure to not write in a timing that is not allowed by the hardware

@c1728p9
Copy link
Contributor

c1728p9 commented Apr 4, 2018

With #6536 this test should pass even with the loop so this change may not be needed.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 4, 2018

Thanks @c1728p9 for the confirmation, will wait for that one to land

@sg- sg- removed the needs: review label Apr 9, 2018
@jeromecoutant jeromecoutant deleted the PR_COMMON_TEST_UPDATE branch April 9, 2018 12:56
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