You are reading a single comment by @dklinkman and its replies. Click here to read the full conversation.
  • I've been able to fairly consistently cause this problem on one of my pucks while I was troubleshooting some code. It occurs when I am uploading the attached file. Generally I would upload some new code, maybe save it, or not, disconnect so I can check the temperature service from my phone, then reconnect. So basically repeating the sequence. It doesn't happen frequently, but on occasion, I get the following on a save:

     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
     1v90.12 Copyright 2016 G.Williams
    BLE Connected, so queueing service update for later
    Erasing Flash...

    It seems to happen when that BLE message appears during the save. It's not unusual to see that message when the IDE console is connected. But normally it doesn't affect anything.

    At this point I have to pull the battery to get reconnected. I can upload code but I can't save it. If I try the puck disconnects. I apply the fix which is this:

    var f = require("Flash");
    f.erasePage((120 - 3) * 4096);
    f.erasePage((120 - 2) * 4096);
    f.erasePage((120 - 1) * 4096);

    and then I can reset() and save(), and everything is good again. Upload the code and save(), and back in business. When @Gordon gets back I'm sure he'll take a look at this scenario of the BLE message appearing during the save. If there was a way to disable services I could do that in the NRF.on("connect", ...) function. Maybe I'll try doing a reset 'on connect'. That will stop the services, and then I just need to type load() to get the code back. Services won't be running yet in this case. Or just try to remember to type reset() before uploading new code. Not really a solution though.

    1 Attachment


Avatar for dklinkman @dklinkman started