{"push_id":936481279,"size":132,"distinct_size":0,"ref":"refs/heads/develop","head":"03eed215b456b69dc7e3df90e33ce907c3164055","before":"c6c11d8a6f692a79b3bdf51af7afdf6e59bf9636","commits":[{"sha":"bf025124335187c1fbb106426d791aa43d133ade","author":{"email":"3eae08a833f36480f735ad7389532a93a2b91724@gmail.com","name":"Peter Qu"},"message":"Merge remote-tracking branch 'spark/develop' into develop","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/bf025124335187c1fbb106426d791aa43d133ade"},{"sha":"0cd08122d585bc138b1c7243065cbbb47aa4192a","author":{"email":"49908ce0ae9eedd8e54223cc9bec33e6b90c7109@gmail.com","name":"Julien Vanier"},"message":"Improve EEPROM stability and persistence\n### Changes\n* Don't erase a page of flash ON EVERY BOOT to increase Flash life and avoid erasing Flash in every low power situations\n* Don't format the EEPROM in case both pages are valid, just erase one\n* Lock the Flash after initialization or variable write\n\n### Background\n\nBad chargers and depleted batteries cause the EEPROM contents to be lost on the Photon and Electron.\nhttp://community.particle.io/t/eeprom-persistence-issue/16514\nhttps://community.particle.io/t/photon-ran-low-on-battery-now-stuck-in-sos/16710\n#704\n\nThe root cause is still not clear but one factor making it worse is the fact that the STM EEPROM emulation code (AN3390) erases one page of Flash on every boot. This is unnecessary and aweful for Flash life. Also what happens exactly if the microcontroller looses power during this erase operation? Experience shows that the EEPROM contents will be lost.\n\nThis is not a complete fix since an EEPROM erase could still happen during a low battery situation, but it will decrease the occurence of these issues.\n\n### Steps to reproduce EEPROM persistence issue\n\n1. Flash this application code\n\n```\n#include \"application.h\"\n\n// Write something to the EEPROM on demand\nint eepromWrite(String value) {\n  EEPROM.write(0, 0xA5);\n  return 0;\n}\n\nvoid setup()\n{\n  RGB.control(true);\n  if(EEPROM.read(0) == 0xFF) {\n    // Red means the EEPROM was wiped\n    RGB.color(255, 0, 0);\n  } else {\n    // Yellow means the EEPROM was preserved\n    RGB.color(255, 255, 0);\n  }\n  Particle.function(\"eepromWrite\", eepromWrite);\n}\n```\n\n2. Call `particle call device eepromWrite`\n3. Reboot the Photon and notice the yellow LED meaning EEPROM contents are saved\n4. Unplug the USB\n5. Replug it partially, fiddle with it, making sure the white LED turn on and off multiple times and even turns partially on\n6. Plug USB firmly\n7. Notice the red LED meaning the EEPROM contents were lost. Try again if it doesn't fail on the first try\n\n[Video of failure before the fix](https://youtu.be/YSzFfkvTlE8)\n[Video of correct behavior after the fix](https://youtu.be/iKj_9vaid5A)","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/0cd08122d585bc138b1c7243065cbbb47aa4192a"},{"sha":"1f7bd115122aa70bbf3afe88aee299deb2015828","author":{"email":"3eae08a833f36480f735ad7389532a93a2b91724@gmail.com","name":"Peter Qu"},"message":"Merge remote-tracking branch 'spark/develop' into fix-system-sleep","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/1f7bd115122aa70bbf3afe88aee299deb2015828"},{"sha":"5719e606b3210bcb225779b3d5cd64b6c3d8b821","author":{"email":"3eae08a833f36480f735ad7389532a93a2b91724@gmail.com","name":"Peter Qu"},"message":"Merge remote-tracking branch 'spark/develop' into fix-system-sleep","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/5719e606b3210bcb225779b3d5cd64b6c3d8b821"},{"sha":"d6739fe7b3e416fa0e3eee43138678d6c7d7f369","author":{"email":"3eae08a833f36480f735ad7389532a93a2b91724@gmail.com","name":"Peter Qu"},"message":"Fixed system wake up issue #655\n\nInitialized all structs in HAL_Interrupts and PinMode method.\nUninitialized GPIO_InitTypeDef struct in pinMode() can cause wake up\npin to be set as  Alternative Function pin.  This will lead to failure\nin setting up the interrupt on the wake up pin.","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/d6739fe7b3e416fa0e3eee43138678d6c7d7f369"},{"sha":"48bc9bf3fb175e6480670d6c8051e91914802039","author":{"email":"0a813c7f9cadf6e6549ba00f99d18d1e6e7fcc15@gmail.com","name":"Matthew McGowan"},"message":"persist current CoAP message ID so that resumed sessions resume from the last used ID.","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/48bc9bf3fb175e6480670d6c8051e91914802039"},{"sha":"0c0dddcaf1b9e0cd92bc3c6b9a056a00be4dee46","author":{"email":"0a813c7f9cadf6e6549ba00f99d18d1e6e7fcc15@gmail.com","name":"Matthew McGowan"},"message":"fixes for comms library unit tests.","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/0c0dddcaf1b9e0cd92bc3c6b9a056a00be4dee46"},{"sha":"c7d5db7680bece73f65d2d61392fe6de87f28684","author":{"email":"0a813c7f9cadf6e6549ba00f99d18d1e6e7fcc15@gmail.com","name":"Matthew McGowan"},"message":"cloud.bats runs all tests - none are skipped.","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/c7d5db7680bece73f65d2d61392fe6de87f28684"},{"sha":"14c6a05c5f178b17e8b70a141f21ace64f898a8a","author":{"email":"83bbb28d0d08ddcec2cf7450469fd4a5163599ce@enistek.com","name":"Andrey Tolstoy"},"message":"Fixes RSA private key generation\n\nCertain P/Q/DP/DQ/QP values caused RSAPrivateKeyWriter to generate incorrect private key in DER format.","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/14c6a05c5f178b17e8b70a141f21ace64f898a8a"},{"sha":"72a11a7beddcfb2f164cdae1a239a2349dc55ac0","author":{"email":"fd2b0a636ed0c80c1646cd2c2e72f7a758b42b5b@enistek.com","name":"Andrey Tolstoy"},"message":"Remove duplicate blocks of code. Rename RSADERCommon::write_integeri -> write_integer_immediate","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/72a11a7beddcfb2f164cdae1a239a2349dc55ac0"},{"sha":"fabeab6ffd4720e582f442ca16f5dfd745247ee5","author":{"email":"fd2b0a636ed0c80c1646cd2c2e72f7a758b42b5b@enistek.com","name":"Andrey Tolstoy"},"message":"Test app that generates RSA keypairs and dumps through Serial.\n\nThe keys validity can be verified by verify_keys.py script.","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/fabeab6ffd4720e582f442ca16f5dfd745247ee5"},{"sha":"5d3efc60bb1dcd9cae3ffac658af4be0a774b4d5","author":{"email":"0a813c7f9cadf6e6549ba00f99d18d1e6e7fcc15@gmail.com","name":"Matthew McGowan"},"message":"ymodem: implements wall-clock timeout rather than counting execution loops","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/5d3efc60bb1dcd9cae3ffac658af4be0a774b4d5"},{"sha":"b491138a155b4bc79be58f0a164dc7bf6435ffbb","author":{"email":"0a813c7f9cadf6e6549ba00f99d18d1e6e7fcc15@gmail.com","name":"Matthew McGowan"},"message":"rework main ymodem loop to use condition guards rather than break statements - makes the condition for existing the loop clear.   `sz` application sometimes sends spaces - these are ignored.","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/b491138a155b4bc79be58f0a164dc7bf6435ffbb"},{"sha":"325378602cc4ce4d17dab26db45084d0d53b2f8f","author":{"email":"0a813c7f9cadf6e6549ba00f99d18d1e6e7fcc15@gmail.com","name":"Matthew McGowan"},"message":"cannot delay() since this blocks while SPARK_UPDATE is non-zero.","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/325378602cc4ce4d17dab26db45084d0d53b2f8f"},{"sha":"da14b81938fe4dd8e25a88b8f79b795c7f9ba792","author":{"email":"0a813c7f9cadf6e6549ba00f99d18d1e6e7fcc15@gmail.com","name":"Matthew McGowan"},"message":"UDP protocol: sent ping every hour, with 30s expected response time.  Also send ping when establishing the connection if  hello is not sent to allow the application to force connection validation by disconnecting/reconnecting.","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/da14b81938fe4dd8e25a88b8f79b795c7f9ba792"},{"sha":"b522e4059d3fc7e5cafa7275e18550f99575bf15","author":{"email":"0a813c7f9cadf6e6549ba00f99d18d1e6e7fcc15@gmail.com","name":"Matthew McGowan"},"message":"Merge pull request #779 from avtolstoy/rsa_der_generation\n\nFixes RSA private key generation","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/b522e4059d3fc7e5cafa7275e18550f99575bf15"},{"sha":"1a0c5a2c204b312ae8c0435728999d6e3f296ead","author":{"email":"0a813c7f9cadf6e6549ba00f99d18d1e6e7fcc15@gmail.com","name":"Matthew McGowan"},"message":"Merge pull request #778 from peterqu/fix-system-sleep\n\nFix system sleep #655","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/1a0c5a2c204b312ae8c0435728999d6e3f296ead"},{"sha":"4d408b8c2936b2ee031b9d58aa1f3edaf710c3e6","author":{"email":"6248b341c3c3b8fe498b0639095ce74cc8832f29@gmail.com","name":"Technobly"},"message":"updates tinker app to include all new electron pins","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/4d408b8c2936b2ee031b9d58aa1f3edaf710c3e6"},{"sha":"881adfcdaf84daeac4ba4f142dc34d9d1296c290","author":{"email":"6248b341c3c3b8fe498b0639095ce74cc8832f29@gmail.com","name":"Technobly"},"message":"bump release script and default to tinker","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/881adfcdaf84daeac4ba4f142dc34d9d1296c290"},{"sha":"4e0ad5b446dfe24fcdd141643278ac86f117754c","author":{"email":"6248b341c3c3b8fe498b0639095ce74cc8832f29@gmail.com","name":"Technobly"},"message":"it's a bird, it's a plane","distinct":false,"url":"https://api.github.com/repos/avtolstoy/firmware/commits/4e0ad5b446dfe24fcdd141643278ac86f117754c"}]}