{"action":"created","issue":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/1815","repository_url":"https://api.github.com/repos/esp8266/Arduino","labels_url":"https://api.github.com/repos/esp8266/Arduino/issues/1815/labels{/name}","comments_url":"https://api.github.com/repos/esp8266/Arduino/issues/1815/comments","events_url":"https://api.github.com/repos/esp8266/Arduino/issues/1815/events","html_url":"https://github.com/esp8266/Arduino/issues/1815","id":143397135,"number":1815,"title":"Crash when using SD library and no card is present","user":{"login":"bHogan2","id":5552323,"avatar_url":"https://avatars.githubusercontent.com/u/5552323?v=3","gravatar_id":"","url":"https://api.github.com/users/bHogan2","html_url":"https://github.com/bHogan2","followers_url":"https://api.github.com/users/bHogan2/followers","following_url":"https://api.github.com/users/bHogan2/following{/other_user}","gists_url":"https://api.github.com/users/bHogan2/gists{/gist_id}","starred_url":"https://api.github.com/users/bHogan2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bHogan2/subscriptions","organizations_url":"https://api.github.com/users/bHogan2/orgs","repos_url":"https://api.github.com/users/bHogan2/repos","events_url":"https://api.github.com/users/bHogan2/events{/privacy}","received_events_url":"https://api.github.com/users/bHogan2/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/esp8266/Arduino/labels/component:%20libraries","name":"component: libraries","color":"c7def8"},{"url":"https://api.github.com/repos/esp8266/Arduino/labels/type:%20bug","name":"type: bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/esp8266/Arduino/milestones/6","html_url":"https://github.com/esp8266/Arduino/milestones/2.3.0","labels_url":"https://api.github.com/repos/esp8266/Arduino/milestones/6/labels","id":1712958,"number":6,"title":"2.3.0","description":"","creator":{"login":"igrr","id":4349050,"avatar_url":"https://avatars.githubusercontent.com/u/4349050?v=3","gravatar_id":"","url":"https://api.github.com/users/igrr","html_url":"https://github.com/igrr","followers_url":"https://api.github.com/users/igrr/followers","following_url":"https://api.github.com/users/igrr/following{/other_user}","gists_url":"https://api.github.com/users/igrr/gists{/gist_id}","starred_url":"https://api.github.com/users/igrr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igrr/subscriptions","organizations_url":"https://api.github.com/users/igrr/orgs","repos_url":"https://api.github.com/users/igrr/repos","events_url":"https://api.github.com/users/igrr/events{/privacy}","received_events_url":"https://api.github.com/users/igrr/received_events","type":"User","site_admin":false},"open_issues":43,"closed_issues":4,"state":"open","created_at":"2016-04-18T08:03:51Z","updated_at":"2016-06-12T16:58:03Z","due_on":"2016-04-29T21:00:00Z","closed_at":null},"comments":3,"created_at":"2016-03-25T00:55:21Z","updated_at":"2016-06-13T11:31:40Z","closed_at":null,"body":"### WDT error under circumstances described below.\r\n#### Hardware\r\nHardware:\t\tESP-12 \r\nCore Version:      \t2.1.0 stable\r\nOS: Win10\r\n### Description      \r\n\r\nI'm using an I2C OLED and an SPI SD card. Under 2.0.0 I could run both together - as long as I started SPI before I2C. (A workaround) If I didn't, I could still read the card, but if there was NO CARD, the ESP would hang with a WDT error.\r\n\r\nWith 2.1.0 it doesn't matter which I do first, I'll always get the WDT hang.\r\nNot sure why - but wanted to call the difference to your attention in case it rings a bell..\r\n### Settings in IDE\r\n\r\nModule:  \t\t\tGeneric ESP8266 Module\r\nFlash Size: \t\t512k\r\nCPU Frequency:\t80Mhz\r\nFlash Mode:\t\tDIO\r\nFlash Frequency:\t80Mhz\r\nUpload Using:\t\tSERIAL\r\nReset Method:\t\tck\r\n\r\n\r\n### Sketch\r\npseudocode of a big sketch . . .\r\n\r\n\r\nvoid setup() {\r\nEEPROM.begin(4096);  // FWIW\r\nSPI.begin()\r\n\r\nif (! SD.begin(SD_SELECT)) {           // triggers the WDT error if no card\r\n    Serial.println(\"No Card\");\r\n    return NO_CARD;             \r\n}\r\nSPI.end();                            //done with SPI so close it so pins can be reused\r\n///////////////////////////////////\r\nWire.pins(SDA_PIN, SCL_PIN);          // define pins used for I2C\r\n  Wire.begin();                                     // HAD TO DO THIS AFTER SPI else  \"no card WDT reset\"\r\n}\r\n\r\nvoid loop() {\r\n}\r\n```\r\n#define SDA_PIN         0               // I2C SDA pin (pulled up) + PGM button and LED\r\n#define SCL_PIN         2               // I2C SCL pin (pulled up)\r\n#define MISO_PIN     12               // (when used) MISO (DO on SD)   \r\n#define MOSI_PIN      13              // MOSI (DI on SD)\r\n#define SCLK_PIN      14               // SCLK (SCK on SD)\r\n#define CS_PIN           15              // SS (CS on SD)- always LOW that's OK - not used\r\n// WAKE                16               // wired to RESET through cap to wake from sleep\r\n\r\n### Debug Messages\r\n\r\nWDT timeout\r\n\r\n\r\n\r\n\r\n\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/32238017-crash-when-using-sd-library-and-no-card-is-present?utm_campaign=plugin&utm_content=tracker%2F14245935&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F14245935&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/comments/225556120","html_url":"https://github.com/esp8266/Arduino/issues/1815#issuecomment-225556120","issue_url":"https://api.github.com/repos/esp8266/Arduino/issues/1815","id":225556120,"user":{"login":"igrr","id":4349050,"avatar_url":"https://avatars.githubusercontent.com/u/4349050?v=3","gravatar_id":"","url":"https://api.github.com/users/igrr","html_url":"https://github.com/igrr","followers_url":"https://api.github.com/users/igrr/followers","following_url":"https://api.github.com/users/igrr/following{/other_user}","gists_url":"https://api.github.com/users/igrr/gists{/gist_id}","starred_url":"https://api.github.com/users/igrr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igrr/subscriptions","organizations_url":"https://api.github.com/users/igrr/orgs","repos_url":"https://api.github.com/users/igrr/repos","events_url":"https://api.github.com/users/igrr/events{/privacy}","received_events_url":"https://api.github.com/users/igrr/received_events","type":"User","site_admin":false},"created_at":"2016-06-13T11:31:40Z","updated_at":"2016-06-13T11:31:40Z","body":"Fixed in 9172033"}}
{"actor":{"display_login":"igrr"}}