{"action":"created","issue":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/6840","repository_url":"https://api.github.com/repos/ARMmbed/mbed-os","labels_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/6840/labels{/name}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/6840/comments","events_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/6840/events","html_url":"https://github.com/ARMmbed/mbed-os/issues/6840","id":321143354,"number":6840,"title":"STM32L0 EventQueue LPTIMER","user":{"login":"simonnilsson","id":7404511,"avatar_url":"https://avatars2.githubusercontent.com/u/7404511?v=4","gravatar_id":"","url":"https://api.github.com/users/simonnilsson","html_url":"https://github.com/simonnilsson","followers_url":"https://api.github.com/users/simonnilsson/followers","following_url":"https://api.github.com/users/simonnilsson/following{/other_user}","gists_url":"https://api.github.com/users/simonnilsson/gists{/gist_id}","starred_url":"https://api.github.com/users/simonnilsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonnilsson/subscriptions","organizations_url":"https://api.github.com/users/simonnilsson/orgs","repos_url":"https://api.github.com/users/simonnilsson/repos","events_url":"https://api.github.com/users/simonnilsson/events{/privacy}","received_events_url":"https://api.github.com/users/simonnilsson/received_events","type":"User","site_admin":false},"labels":[{"id":515345182,"url":"https://api.github.com/repos/ARMmbed/mbed-os/labels/component:%20drivers","name":"component: drivers","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-05-08T11:13:42Z","updated_at":"2018-05-14T09:09:38Z","closed_at":null,"author_association":"NONE","body":"### Description\r\n<!-- \r\n    Required\r\n    Add detailed description of what you are reporting.\r\n    Good example: https://os.mbed.com/docs/latest/reference/workflow.html\r\n    Things to consider sharing:\r\n    - What target does this relate to?\r\n    - What toolchain (name + version) are you using?\r\n    - What tools (name + version - is it mbed-cli, online compiler or IDE) are you using?\r\n    - What is the SHA of Mbed OS (git log -n1 --oneline)?\r\n    - Steps to reproduce. (Did you publish code or a test case that exhibits the problem?)\r\n-->\r\n**Target**\r\nCustom **stm32l071** target based on the existing stm32l072 target\r\n\r\n**Tools**\r\nKeil uVision\r\n\r\n**Mbed OS Version**\r\nARMmbed/mbed-os@c8d72c5\r\n\r\nI have a problem where the the EventQueue stops firing timed events after approximately 71 minutes.\r\n\r\nI suspect this has something to do with a 32-bit integer somewhere used to store the microsecond time which would mean it would reach about 71.58 minutes before overflowing.\r\n\r\nUsing the following code:\r\n\r\n```c++\r\n#include \"mbed.h\"\r\n#include \"events/EventQueue.h\"\r\n\r\nusing namespace events;\r\n\r\nDigitalOut led1(LED1, 1);\r\n\r\nstatic EventQueue ev_queue(20 * EVENTS_EVENT_SIZE);\r\n\r\nstatic void toggleLed() {\r\n\tled1 = !led1;\r\n}\r\n\r\nint main() \r\n{\t\r\n\tev_queue.call_every(5000, toggleLed);\r\n\tev_queue.dispatch_forever();\r\n\treturn 0;\r\n}\r\n```\r\n\r\nWith **MBED_CONF_EVENTS_USE_LOWPOWER_TIMER_TICKER** set to **1** and RTOS excluded in **.mbedignore**.\r\n\r\nThe issue has previously been discussed here: \r\nhttps://github.com/ARMmbed/mbed-os-example-lorawan/issues/65\r\n\r\n### Issue request type\r\n<!-- \r\n    Required\r\n    Please add only one X to one of the following types. Do not fill multiple types. (Split the issue otherwise.)\r\n    Please note this is not a GitHub task list; indenting the boxes or changing the format to add a '.' or '*' in front\r\n    of them changes the meaning incorrectly. The only changes to make are to add a description under the\r\n    description heading and to add an 'x' to the correct box.\r\n\r\n    [X] Question\r\n    [ ] Enhancement \r\n    [ ] Bug \r\n-->\r\n\r\n[ ] Question  \r\n[ ] Enhancement  \r\n[X] Bug  \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/comments/388749067","html_url":"https://github.com/ARMmbed/mbed-os/issues/6840#issuecomment-388749067","issue_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/6840","id":388749067,"user":{"login":"0xc0170","id":2963726,"avatar_url":"https://avatars0.githubusercontent.com/u/2963726?v=4","gravatar_id":"","url":"https://api.github.com/users/0xc0170","html_url":"https://github.com/0xc0170","followers_url":"https://api.github.com/users/0xc0170/followers","following_url":"https://api.github.com/users/0xc0170/following{/other_user}","gists_url":"https://api.github.com/users/0xc0170/gists{/gist_id}","starred_url":"https://api.github.com/users/0xc0170/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0xc0170/subscriptions","organizations_url":"https://api.github.com/users/0xc0170/orgs","repos_url":"https://api.github.com/users/0xc0170/repos","events_url":"https://api.github.com/users/0xc0170/events{/privacy}","received_events_url":"https://api.github.com/users/0xc0170/received_events","type":"User","site_admin":false},"created_at":"2018-05-14T09:09:37Z","updated_at":"2018-05-14T09:09:37Z","author_association":"MEMBER","body":"@simonnilsson Can you please test that feature branch mentioned (https://github.com/ARMmbed/mbed-os/tree/feature-hal-spec-ticker)  and let us know the results ?"}}
{"actor":{"display_login":"0xc0170"}}