{"action":"created","comment":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/comments/177682951","pull_request_review_id":107595968,"id":177682951,"diff_hunk":"@@ -104,6 +104,26 @@ void lp_ticker_glitch_test()\n     }\n }\n \n+void lp_ticker_consecutive_set_interrupt(void)\n+{\n+    intFlag = 0;\n+\n+    const ticker_info_t* p_ticker_info = lp_ticker_get_info();\n+\n+    set_lp_ticker_irq_handler(ticker_event_handler_stub);\n+\n+    lp_ticker_init();\n+\n+    const uint32_t tick_count = lp_ticker_read();\n+\n+    lp_ticker_set_interrupt(0);","path":"TESTS/mbed_hal/lp_ticker/main.cpp","position":16,"original_position":16,"commit_id":"525f55168e73505032b47697892be8c618af3866","original_commit_id":"525f55168e73505032b47697892be8c618af3866","user":{"login":"mprse","id":30721012,"avatar_url":"https://avatars0.githubusercontent.com/u/30721012?v=4","gravatar_id":"","url":"https://api.github.com/users/mprse","html_url":"https://github.com/mprse","followers_url":"https://api.github.com/users/mprse/followers","following_url":"https://api.github.com/users/mprse/following{/other_user}","gists_url":"https://api.github.com/users/mprse/gists{/gist_id}","starred_url":"https://api.github.com/users/mprse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mprse/subscriptions","organizations_url":"https://api.github.com/users/mprse/orgs","repos_url":"https://api.github.com/users/mprse/repos","events_url":"https://api.github.com/users/mprse/events{/privacy}","received_events_url":"https://api.github.com/users/mprse/received_events","type":"User","site_admin":false},"body":"Please note that setting interrupt to some constant value like 0 is hazardous. Init function does not resets the ticker counter, so in some specific case if we are just about to overflow while setting the first interrupt it may be fired immediately (before the interrupt is rescheduled). And after wait `intFlag` might be equal to 2.\r\n\r\nAdditionally I think we have such test case already: https://github.com/ARMmbed/mbed-os/blob/c9ecc9b2db33f419e59140bb2309095b325fe6b6/TESTS/mbed_hal/common_tickers/main.cpp#L227","created_at":"2018-03-28T09:03:42Z","updated_at":"2018-03-28T09:03:42Z","html_url":"https://github.com/ARMmbed/mbed-os/pull/6493#discussion_r177682951","pull_request_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/6493","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/comments/177682951"},"html":{"href":"https://github.com/ARMmbed/mbed-os/pull/6493#discussion_r177682951"},"pull_request":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/6493"}}},"pull_request":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/6493","id":177964632,"html_url":"https://github.com/ARMmbed/mbed-os/pull/6493","diff_url":"https://github.com/ARMmbed/mbed-os/pull/6493.diff","patch_url":"https://github.com/ARMmbed/mbed-os/pull/6493.patch","issue_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/6493","number":6493,"state":"open","locked":false,"title":"Add test for consecutive set_interrupt calls for lp ticker","user":{"login":"bulislaw","id":107253,"avatar_url":"https://avatars2.githubusercontent.com/u/107253?v=4","gravatar_id":"","url":"https://api.github.com/users/bulislaw","html_url":"https://github.com/bulislaw","followers_url":"https://api.github.com/users/bulislaw/followers","following_url":"https://api.github.com/users/bulislaw/following{/other_user}","gists_url":"https://api.github.com/users/bulislaw/gists{/gist_id}","starred_url":"https://api.github.com/users/bulislaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bulislaw/subscriptions","organizations_url":"https://api.github.com/users/bulislaw/orgs","repos_url":"https://api.github.com/users/bulislaw/repos","events_url":"https://api.github.com/users/bulislaw/events{/privacy}","received_events_url":"https://api.github.com/users/bulislaw/received_events","type":"User","site_admin":false},"body":"### Description\r\n\r\n* Add test for consecutive set_interrupt calls for lp ticker\r\n\r\n### Pull request type\r\n\r\n[ ] Fix  \r\n[ ] Refactor  \r\n[ ] New target  \r\n[x] Feature  \r\n[ ] Breaking change\r\n\r\nThe question is whether we should only keep it for LP or use it for both us and lp.\r\n\r\nCC: @mprse @c1728p9 @jeromecoutant @LMESTM ","created_at":"2018-03-28T08:32:45Z","updated_at":"2018-03-28T09:03:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a413333dd8467a1277a90567ae27ae716918ca6f","assignee":{"login":"bulislaw","id":107253,"avatar_url":"https://avatars2.githubusercontent.com/u/107253?v=4","gravatar_id":"","url":"https://api.github.com/users/bulislaw","html_url":"https://github.com/bulislaw","followers_url":"https://api.github.com/users/bulislaw/followers","following_url":"https://api.github.com/users/bulislaw/following{/other_user}","gists_url":"https://api.github.com/users/bulislaw/gists{/gist_id}","starred_url":"https://api.github.com/users/bulislaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bulislaw/subscriptions","organizations_url":"https://api.github.com/users/bulislaw/orgs","repos_url":"https://api.github.com/users/bulislaw/repos","events_url":"https://api.github.com/users/bulislaw/events{/privacy}","received_events_url":"https://api.github.com/users/bulislaw/received_events","type":"User","site_admin":false},"assignees":[{"login":"bulislaw","id":107253,"avatar_url":"https://avatars2.githubusercontent.com/u/107253?v=4","gravatar_id":"","url":"https://api.github.com/users/bulislaw","html_url":"https://github.com/bulislaw","followers_url":"https://api.github.com/users/bulislaw/followers","following_url":"https://api.github.com/users/bulislaw/following{/other_user}","gists_url":"https://api.github.com/users/bulislaw/gists{/gist_id}","starred_url":"https://api.github.com/users/bulislaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bulislaw/subscriptions","organizations_url":"https://api.github.com/users/bulislaw/orgs","repos_url":"https://api.github.com/users/bulislaw/repos","events_url":"https://api.github.com/users/bulislaw/events{/privacy}","received_events_url":"https://api.github.com/users/bulislaw/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":147112891,"url":"https://api.github.com/repos/ARMmbed/mbed-os/labels/needs:%20review","name":"needs: review","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/6493/commits","review_comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/6493/comments","review_comment_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/6493/comments","statuses_url":"https://api.github.com/repos/ARMmbed/mbed-os/statuses/525f55168e73505032b47697892be8c618af3866","head":{"label":"bulislaw:feature-hal-spec-ticker-dual-set","ref":"feature-hal-spec-ticker-dual-set","sha":"525f55168e73505032b47697892be8c618af3866","user":{"login":"bulislaw","id":107253,"avatar_url":"https://avatars2.githubusercontent.com/u/107253?v=4","gravatar_id":"","url":"https://api.github.com/users/bulislaw","html_url":"https://github.com/bulislaw","followers_url":"https://api.github.com/users/bulislaw/followers","following_url":"https://api.github.com/users/bulislaw/following{/other_user}","gists_url":"https://api.github.com/users/bulislaw/gists{/gist_id}","starred_url":"https://api.github.com/users/bulislaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bulislaw/subscriptions","organizations_url":"https://api.github.com/users/bulislaw/orgs","repos_url":"https://api.github.com/users/bulislaw/repos","events_url":"https://api.github.com/users/bulislaw/events{/privacy}","received_events_url":"https://api.github.com/users/bulislaw/received_events","type":"User","site_admin":false},"repo":{"id":65007983,"name":"mbed-os","full_name":"bulislaw/mbed-os","owner":{"login":"bulislaw","id":107253,"avatar_url":"https://avatars2.githubusercontent.com/u/107253?v=4","gravatar_id":"","url":"https://api.github.com/users/bulislaw","html_url":"https://github.com/bulislaw","followers_url":"https://api.github.com/users/bulislaw/followers","following_url":"https://api.github.com/users/bulislaw/following{/other_user}","gists_url":"https://api.github.com/users/bulislaw/gists{/gist_id}","starred_url":"https://api.github.com/users/bulislaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bulislaw/subscriptions","organizations_url":"https://api.github.com/users/bulislaw/orgs","repos_url":"https://api.github.com/users/bulislaw/repos","events_url":"https://api.github.com/users/bulislaw/events{/privacy}","received_events_url":"https://api.github.com/users/bulislaw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bulislaw/mbed-os","description":null,"fork":true,"url":"https://api.github.com/repos/bulislaw/mbed-os","forks_url":"https://api.github.com/repos/bulislaw/mbed-os/forks","keys_url":"https://api.github.com/repos/bulislaw/mbed-os/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bulislaw/mbed-os/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bulislaw/mbed-os/teams","hooks_url":"https://api.github.com/repos/bulislaw/mbed-os/hooks","issue_events_url":"https://api.github.com/repos/bulislaw/mbed-os/issues/events{/number}","events_url":"https://api.github.com/repos/bulislaw/mbed-os/events","assignees_url":"https://api.github.com/repos/bulislaw/mbed-os/assignees{/user}","branches_url":"https://api.github.com/repos/bulislaw/mbed-os/branches{/branch}","tags_url":"https://api.github.com/repos/bulislaw/mbed-os/tags","blobs_url":"https://api.github.com/repos/bulislaw/mbed-os/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bulislaw/mbed-os/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bulislaw/mbed-os/git/refs{/sha}","trees_url":"https://api.github.com/repos/bulislaw/mbed-os/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bulislaw/mbed-os/statuses/{sha}","languages_url":"https://api.github.com/repos/bulislaw/mbed-os/languages","stargazers_url":"https://api.github.com/repos/bulislaw/mbed-os/stargazers","contributors_url":"https://api.github.com/repos/bulislaw/mbed-os/contributors","subscribers_url":"https://api.github.com/repos/bulislaw/mbed-os/subscribers","subscription_url":"https://api.github.com/repos/bulislaw/mbed-os/subscription","commits_url":"https://api.github.com/repos/bulislaw/mbed-os/commits{/sha}","git_commits_url":"https://api.github.com/repos/bulislaw/mbed-os/git/commits{/sha}","comments_url":"https://api.github.com/repos/bulislaw/mbed-os/comments{/number}","issue_comment_url":"https://api.github.com/repos/bulislaw/mbed-os/issues/comments{/number}","contents_url":"https://api.github.com/repos/bulislaw/mbed-os/contents/{+path}","compare_url":"https://api.github.com/repos/bulislaw/mbed-os/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bulislaw/mbed-os/merges","archive_url":"https://api.github.com/repos/bulislaw/mbed-os/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bulislaw/mbed-os/downloads","issues_url":"https://api.github.com/repos/bulislaw/mbed-os/issues{/number}","pulls_url":"https://api.github.com/repos/bulislaw/mbed-os/pulls{/number}","milestones_url":"https://api.github.com/repos/bulislaw/mbed-os/milestones{/number}","notifications_url":"https://api.github.com/repos/bulislaw/mbed-os/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bulislaw/mbed-os/labels{/name}","releases_url":"https://api.github.com/repos/bulislaw/mbed-os/releases{/id}","deployments_url":"https://api.github.com/repos/bulislaw/mbed-os/deployments","created_at":"2016-08-05T09:47:18Z","updated_at":"2016-08-05T09:48:27Z","pushed_at":"2018-03-28T08:30:16Z","git_url":"git://github.com/bulislaw/mbed-os.git","ssh_url":"git@github.com:bulislaw/mbed-os.git","clone_url":"https://github.com/bulislaw/mbed-os.git","svn_url":"https://github.com/bulislaw/mbed-os","homepage":"","size":196713,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ARMmbed:feature-hal-spec-ticker","ref":"feature-hal-spec-ticker","sha":"c9ecc9b2db33f419e59140bb2309095b325fe6b6","user":{"login":"ARMmbed","id":8916057,"avatar_url":"https://avatars3.githubusercontent.com/u/8916057?v=4","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"repo":{"id":8270972,"name":"mbed-os","full_name":"ARMmbed/mbed-os","owner":{"login":"ARMmbed","id":8916057,"avatar_url":"https://avatars3.githubusercontent.com/u/8916057?v=4","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ARMmbed/mbed-os","description":"ARM Mbed OS is a platform operating system designed for the internet of things","fork":false,"url":"https://api.github.com/repos/ARMmbed/mbed-os","forks_url":"https://api.github.com/repos/ARMmbed/mbed-os/forks","keys_url":"https://api.github.com/repos/ARMmbed/mbed-os/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ARMmbed/mbed-os/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ARMmbed/mbed-os/teams","hooks_url":"https://api.github.com/repos/ARMmbed/mbed-os/hooks","issue_events_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/events{/number}","events_url":"https://api.github.com/repos/ARMmbed/mbed-os/events","assignees_url":"https://api.github.com/repos/ARMmbed/mbed-os/assignees{/user}","branches_url":"https://api.github.com/repos/ARMmbed/mbed-os/branches{/branch}","tags_url":"https://api.github.com/repos/ARMmbed/mbed-os/tags","blobs_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/refs{/sha}","trees_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ARMmbed/mbed-os/statuses/{sha}","languages_url":"https://api.github.com/repos/ARMmbed/mbed-os/languages","stargazers_url":"https://api.github.com/repos/ARMmbed/mbed-os/stargazers","contributors_url":"https://api.github.com/repos/ARMmbed/mbed-os/contributors","subscribers_url":"https://api.github.com/repos/ARMmbed/mbed-os/subscribers","subscription_url":"https://api.github.com/repos/ARMmbed/mbed-os/subscription","commits_url":"https://api.github.com/repos/ARMmbed/mbed-os/commits{/sha}","git_commits_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/commits{/sha}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/comments{/number}","issue_comment_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/comments{/number}","contents_url":"https://api.github.com/repos/ARMmbed/mbed-os/contents/{+path}","compare_url":"https://api.github.com/repos/ARMmbed/mbed-os/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ARMmbed/mbed-os/merges","archive_url":"https://api.github.com/repos/ARMmbed/mbed-os/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ARMmbed/mbed-os/downloads","issues_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues{/number}","pulls_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls{/number}","milestones_url":"https://api.github.com/repos/ARMmbed/mbed-os/milestones{/number}","notifications_url":"https://api.github.com/repos/ARMmbed/mbed-os/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ARMmbed/mbed-os/labels{/name}","releases_url":"https://api.github.com/repos/ARMmbed/mbed-os/releases{/id}","deployments_url":"https://api.github.com/repos/ARMmbed/mbed-os/deployments","created_at":"2013-02-18T15:23:11Z","updated_at":"2018-03-28T08:55:36Z","pushed_at":"2018-03-28T09:03:36Z","git_url":"git://github.com/ARMmbed/mbed-os.git","ssh_url":"git@github.com:ARMmbed/mbed-os.git","clone_url":"https://github.com/ARMmbed/mbed-os.git","svn_url":"https://github.com/ARMmbed/mbed-os","homepage":"https://mbed.com","size":203700,"stargazers_count":1562,"watchers_count":1562,"language":"C","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1379,"mirror_url":null,"archived":false,"open_issues_count":432,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":1379,"open_issues":432,"watchers":1562,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/6493"},"html":{"href":"https://github.com/ARMmbed/mbed-os/pull/6493"},"issue":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/issues/6493"},"comments":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/issues/6493/comments"},"review_comments":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/6493/comments"},"review_comment":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/6493/commits"},"statuses":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/statuses/525f55168e73505032b47697892be8c618af3866"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mprse"}}