{"action":"created","issue":{"url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/1500","repository_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware","labels_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/1500/labels{/name}","comments_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/1500/comments","events_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/1500/events","html_url":"https://github.com/nodemcu/nodemcu-firmware/pull/1500","id":177185889,"number":1500,"title":"Fix repeat reboot bug when rfinit data is filled with 0xff","user":{"login":"vowstar","id":394260,"avatar_url":"https://avatars.githubusercontent.com/u/394260?v=3","gravatar_id":"","url":"https://api.github.com/users/vowstar","html_url":"https://github.com/vowstar","followers_url":"https://api.github.com/users/vowstar/followers","following_url":"https://api.github.com/users/vowstar/following{/other_user}","gists_url":"https://api.github.com/users/vowstar/gists{/gist_id}","starred_url":"https://api.github.com/users/vowstar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vowstar/subscriptions","organizations_url":"https://api.github.com/users/vowstar/orgs","repos_url":"https://api.github.com/users/vowstar/repos","events_url":"https://api.github.com/users/vowstar/events{/privacy}","received_events_url":"https://api.github.com/users/vowstar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-09-15T14:03:15Z","updated_at":"2016-10-03T14:53:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/pulls/1500","html_url":"https://github.com/nodemcu/nodemcu-firmware/pull/1500","diff_url":"https://github.com/nodemcu/nodemcu-firmware/pull/1500.diff","patch_url":"https://github.com/nodemcu/nodemcu-firmware/pull/1500.patch"},"body":"Fix repeat reboot bug when rfinit data is filled with 0xff.\r\n\r\n- [x] This PR is compliant with the [contributing guidelines](https://github.com/nodemcu/nodemcu-firmware/blob/dev/CONTRIBUTING.md) (if not, please describe why).\r\n- [x] I have thoroughly tested my contribution.\r\n- [x] The code changes are reflected in the documentation at `docs/en/*`.\r\n\r\n-----\r\n\r\nWhen erase a flash or fill flash with 0xff, using latest https://github.com/nodemcu/nodemcu-firmware/commit/19f80abb3260e689b4f41c54eece8e7ebdd4d4cf will cause reboot repeatly. \r\n\r\nTo verify this, I use these command below:\r\n\r\n```shell\r\n# erase flash\r\n../tools/esptool.py --port /dev/ttyUSB0 erase_flash\r\n```\r\n```shell\r\n# programming firmware\r\n../tools/esptool.py --port /dev/ttyUSB0 write_flash -fm dio -fs 32m -ff 40m 0x00000 ../bin/0x00000.bin 0x10000 ../bin/0x10000.bin\r\n```\r\n\r\nAfter then I got repeatly reboot, so I changed baudrate to 74880 and listen the serial port:\r\n\r\n```shell\r\ncat /dev/ttyUSB0\r\n```\r\n\r\nand the mesage is output again and again:\r\n\r\n```\r\n ets Jan  8 2013,rst cause:2, boot mode:(3,6)\r\n\r\nload 0x40100000, len 26420, room 16 \r\ntail 4\r\nchksum 0xea\r\nload 0x3ffe8000, len 2200, room 4 \r\ntail 4\r\nchksum 0x83\r\nload 0x3ffe8898, len 8, room 4 \r\ntail 4\r\nchksum 0x1f\r\ncsum 0x1f\r\nrf_cal[0] !=0x05,is 0xFF\r\n```\r\n\r\nThe reason is printed at 74880 baud when reboot:\r\n``rf_cal[0] !=0x05,is 0xFF``\r\n\r\n\r\nSo we should not believe ``esp_init_data_default.bin`` is optional in espressif's data sheet, the rf init data __must__ write to flash before run nodemcu firmware.\r\n\r\nThis change will write rf init data to flash when do ``make flash512k`` and``make flash4m``, and fix it."},"comment":{"url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/comments/251127968","html_url":"https://github.com/nodemcu/nodemcu-firmware/pull/1500#issuecomment-251127968","issue_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/1500","id":251127968,"user":{"login":"jimparis","id":204930,"avatar_url":"https://avatars.githubusercontent.com/u/204930?v=3","gravatar_id":"","url":"https://api.github.com/users/jimparis","html_url":"https://github.com/jimparis","followers_url":"https://api.github.com/users/jimparis/followers","following_url":"https://api.github.com/users/jimparis/following{/other_user}","gists_url":"https://api.github.com/users/jimparis/gists{/gist_id}","starred_url":"https://api.github.com/users/jimparis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimparis/subscriptions","organizations_url":"https://api.github.com/users/jimparis/orgs","repos_url":"https://api.github.com/users/jimparis/repos","events_url":"https://api.github.com/users/jimparis/events{/privacy}","received_events_url":"https://api.github.com/users/jimparis/received_events","type":"User","site_admin":false},"created_at":"2016-10-03T14:53:23Z","updated_at":"2016-10-03T14:53:23Z","body":"Yeah, erasing alone does not work.  I will file a PR.  I did understand the point of your comment, just wanted to make sure people were aware that the documentation is no longer accurate (which is a different problem than improving its form/structure)."}}
{"actor":{"display_login":"jimparis"}}