{"action":"created","issue":{"url":"https://api.github.com/repos/lancaster-university/microbit-dal/issues/140","repository_url":"https://api.github.com/repos/lancaster-university/microbit-dal","labels_url":"https://api.github.com/repos/lancaster-university/microbit-dal/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/lancaster-university/microbit-dal/issues/140/comments","events_url":"https://api.github.com/repos/lancaster-university/microbit-dal/issues/140/events","html_url":"https://github.com/lancaster-university/microbit-dal/issues/140","id":152050840,"number":140,"title":"MicroBitCompass stores its compassCal data to flash at every reset","user":{"login":"martinwork","id":989126,"avatar_url":"https://avatars.githubusercontent.com/u/989126?v=3","gravatar_id":"","url":"https://api.github.com/users/martinwork","html_url":"https://github.com/martinwork","followers_url":"https://api.github.com/users/martinwork/followers","following_url":"https://api.github.com/users/martinwork/following{/other_user}","gists_url":"https://api.github.com/users/martinwork/gists{/gist_id}","starred_url":"https://api.github.com/users/martinwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinwork/subscriptions","organizations_url":"https://api.github.com/users/martinwork/orgs","repos_url":"https://api.github.com/users/martinwork/repos","events_url":"https://api.github.com/users/martinwork/events{/privacy}","received_events_url":"https://api.github.com/users/martinwork/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jamesadevine","id":4742697,"avatar_url":"https://avatars.githubusercontent.com/u/4742697?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesadevine","html_url":"https://github.com/jamesadevine","followers_url":"https://api.github.com/users/jamesadevine/followers","following_url":"https://api.github.com/users/jamesadevine/following{/other_user}","gists_url":"https://api.github.com/users/jamesadevine/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesadevine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesadevine/subscriptions","organizations_url":"https://api.github.com/users/jamesadevine/orgs","repos_url":"https://api.github.com/users/jamesadevine/repos","events_url":"https://api.github.com/users/jamesadevine/events{/privacy}","received_events_url":"https://api.github.com/users/jamesadevine/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2016-04-30T20:24:58Z","updated_at":"2016-05-04T20:22:29Z","closed_at":null,"body":"MicroBitCompass::init calls storage->get to retrieve the compassCal data then calls setCalibration.\r\n\r\nsetCalibration calls storage->put, which writes the same compassCal data back to flash."},"comment":{"url":"https://api.github.com/repos/lancaster-university/microbit-dal/issues/comments/216991221","html_url":"https://github.com/lancaster-university/microbit-dal/issues/140#issuecomment-216991221","issue_url":"https://api.github.com/repos/lancaster-university/microbit-dal/issues/140","id":216991221,"user":{"login":"finneyj","id":11539567,"avatar_url":"https://avatars.githubusercontent.com/u/11539567?v=3","gravatar_id":"","url":"https://api.github.com/users/finneyj","html_url":"https://github.com/finneyj","followers_url":"https://api.github.com/users/finneyj/followers","following_url":"https://api.github.com/users/finneyj/following{/other_user}","gists_url":"https://api.github.com/users/finneyj/gists{/gist_id}","starred_url":"https://api.github.com/users/finneyj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/finneyj/subscriptions","organizations_url":"https://api.github.com/users/finneyj/orgs","repos_url":"https://api.github.com/users/finneyj/repos","events_url":"https://api.github.com/users/finneyj/events{/privacy}","received_events_url":"https://api.github.com/users/finneyj/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T20:22:29Z","updated_at":"2016-05-04T20:22:29Z","body":"@martinwork yep - that'll do as a workaround.\r\n\r\nyes, we had also occasionally noticed that feature with BLE connected - pretty sure it's when SoftDevice's high priority interrupt fires during an erase cycle. It's on the list... :-)\r\n\r\nIf you have a repro case though, perhaps you could try disabling interrupts during flashPageErase(), and report back if that solves the behaviour? \r\n"}}