arduino / ArduinoCore-sam

81 stars 107 forks source link

Flash page locked #61

Open ArvindRavichandran opened 5 years ago

ArvindRavichandran commented 5 years ago

Hi I had purchased an Arduino Due a month or two ago for a project that had to stream data from my computer through USB and buffer small amounts of it locally. The controller had to simultaneously provide precise trigger pulses to 7 stepper drivers independently. This lead to my idea of using a portion of the flash storage as buffer. I supposed to have accidentally written and locked pages as i filled the buffers. Now as i use my Atmel ICE with Atmel studio7 to upload sketch (Even something simple like a "Blink") to the board, it uploads the only if i dont erase the flash. Secondly trying to unlock the flash leaves a lock bit stuck enabled. Finally the sketch runs only if I set the GPNVM bits to 0x01 (USBSerial or Serial doesnt't work as the board doesn't get detected if I set the GPNVM register to 0x01). I have tried SAM-BA, Bossac, composing an empty intel flash hex file and trying to flash it, There must be a way to unlock it, but I could not figure it out. The Due board has never been on ecternal power other than my computer's USB (Absolutely Reliable). The issue exists with a lot of other users who have used the library that I used, the "DueFlashLibrary". So someone please show me a direction to go from here. I am out of options now. image image

iddq commented 3 years ago

I think you are using wrong version of bossac