{"action":"created","issue":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/9106","repository_url":"https://api.github.com/repos/ARMmbed/mbed-os","labels_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/9106/labels{/name}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/9106/comments","events_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/9106/events","html_url":"https://github.com/ARMmbed/mbed-os/issues/9106","id":391092471,"node_id":"MDU6SXNzdWUzOTEwOTI0NzE=","number":9106,"title":"Wait() function causes system to hang on STM32F0(91RC)","user":{"login":"geobruce","id":4906120,"node_id":"MDQ6VXNlcjQ5MDYxMjA=","avatar_url":"https://avatars3.githubusercontent.com/u/4906120?v=4","gravatar_id":"","url":"https://api.github.com/users/geobruce","html_url":"https://github.com/geobruce","followers_url":"https://api.github.com/users/geobruce/followers","following_url":"https://api.github.com/users/geobruce/following{/other_user}","gists_url":"https://api.github.com/users/geobruce/gists{/gist_id}","starred_url":"https://api.github.com/users/geobruce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geobruce/subscriptions","organizations_url":"https://api.github.com/users/geobruce/orgs","repos_url":"https://api.github.com/users/geobruce/repos","events_url":"https://api.github.com/users/geobruce/events{/privacy}","received_events_url":"https://api.github.com/users/geobruce/received_events","type":"User","site_admin":false},"labels":[{"id":1075658157,"node_id":"MDU6TGFiZWwxMDc1NjU4MTU3","url":"https://api.github.com/repos/ARMmbed/mbed-os/labels/Jira%20status:%20OPEN","name":"Jira status: OPEN","color":"f9d0c4","default":false},{"id":328051906,"node_id":"MDU6TGFiZWwzMjgwNTE5MDY=","url":"https://api.github.com/repos/ARMmbed/mbed-os/labels/devices:%20st","name":"devices: st","color":"0052cc","default":false},{"id":427713129,"node_id":"MDU6TGFiZWw0Mjc3MTMxMjk=","url":"https://api.github.com/repos/ARMmbed/mbed-os/labels/mirrored","name":"mirrored","color":"ededed","default":false},{"id":28847979,"node_id":"MDU6TGFiZWwyODg0Nzk3OQ==","url":"https://api.github.com/repos/ARMmbed/mbed-os/labels/type:%20bug","name":"type: bug","color":"b60205","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-12-14T12:29:38Z","updated_at":"2018-12-21T14:01:44Z","closed_at":null,"author_association":"NONE","body":"<!--\r\n\r\n   ************************************** WARNING **************************************\r\n\r\n   The ciarcom bot parses this header automatically. Any deviation from the \r\n   template may cause the bot to automatically correct this header or may result in a \r\n   warning message, requesting updates.\r\n\r\n   Please ensure that nothing follows the Issue request type section, all \r\n   issue details are within the Description section and no changes are made to the \r\n   template format (as detailed below).\r\n\r\n   *************************************************************************************\r\n\r\n-->\r\n\r\n### Description\r\nThe “simple mbed blinky program” does not work on the NUCLEO-F091RC when using latest mbed-os-5.10.4 .\r\nThe problem occurs when using the wait function. The program compiles but when flashed the delay is not working and halts the microcontroller. This problem occurs with all possible mbed wait functions.\r\nThe problem seems similar to an earlier “bug” https://github.com/ARMmbed/mbed-os/issues/1494 for and older version of mbed, maybe it is the same problem again. \r\n\r\n```\r\n/* mbed Microcontroller Library\r\n * Copyright (c) 2018 ARM Limited\r\n * SPDX-License-Identifier: Apache-2.0\r\n */\r\n#include \"mbed.h\"\r\n#include \"stats_report.h\"\r\nDigitalOut led1(LED1);\r\nint main()\r\n{\r\n   // SystemReport sys_state(500 /* Loop delay time in ms */);\r\n    while (true) {\r\n        led1 = !led1;\r\n        wait(0.5f); // osDelay(500);     \r\n        //sys_state.report_state();\r\n    }\r\n}\r\n```\r\nWhen I leave the wait function commented, the program runs and I can slow the program down with: \r\n```\r\n       for(int i = 0 ; i<10000;i++){\r\n           printf(\"%i\\r\\n\",i);\r\n       }\r\n```\r\n\r\nSo I’m pretty sure my toolchain is configured correctly and there might be something wrong with the libraries. \r\n\r\nI was able to get this \"error report\" from the \"serial monitor (putty)\" when I discovered the problem with the wait function when I was using a different program. But the problem is already visible by running the blinky program.\r\n\r\n```\r\n-- MbedOS Error Info --\r\n\r\n++ MbedOS Error Info ++Error Status: 0x80020125 Code: 293 Module: 2\r\nError Message: CMSIS-RTOS error: Stack overflow\r\nLocation: 0x8003DFF\r\nError Value: 0x1\r\nCurrent Thread: Id: 0x20001010 Entry: 0x8003DC9 StackSize: 0x200 StackMem: 0x20001098 SP: 0x20007EB0\r\nFor more info, visit: https://armmbed.github.io/mbedos-error/?error=0x80020125\r\n-- MbedOS Error Info --\r\n```\r\n\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\r\n\r\n### Issue request type\r\n\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 would change the meaning incorrectly. The only changes to be made are to add a description text under the\r\n    description heading and to add a 'x' to the correct box.\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/449396151","html_url":"https://github.com/ARMmbed/mbed-os/issues/9106#issuecomment-449396151","issue_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/9106","id":449396151,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTM5NjE1MQ==","user":{"login":"geobruce","id":4906120,"node_id":"MDQ6VXNlcjQ5MDYxMjA=","avatar_url":"https://avatars3.githubusercontent.com/u/4906120?v=4","gravatar_id":"","url":"https://api.github.com/users/geobruce","html_url":"https://github.com/geobruce","followers_url":"https://api.github.com/users/geobruce/followers","following_url":"https://api.github.com/users/geobruce/following{/other_user}","gists_url":"https://api.github.com/users/geobruce/gists{/gist_id}","starred_url":"https://api.github.com/users/geobruce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geobruce/subscriptions","organizations_url":"https://api.github.com/users/geobruce/orgs","repos_url":"https://api.github.com/users/geobruce/repos","events_url":"https://api.github.com/users/geobruce/events{/privacy}","received_events_url":"https://api.github.com/users/geobruce/received_events","type":"User","site_admin":false},"created_at":"2018-12-21T14:01:44Z","updated_at":"2018-12-21T14:01:44Z","author_association":"NONE","body":"I tested version 5.11.0 but no succes yet."}}
{"actor":{"display_login":"geobruce"}}