EEPROM Reset

Firmware/software/electronics/mechanics
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

EEPROM Reset

Post by whoenig »

Hi,
What is the best/easiest way to write default values to the EEPROM? This is useful, for example, if I forgot the address of the Crazyflie and want to change it back to the default 0xE7E7E7E7E7. So far, I changed this line to true, recompiled, flashed and then flashed the original/unchanged firmware again. I am wondering if there is a better way doing this, for example by using the bootloader?

Thanks,
Wolfgang
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: EEPROM Reset

Post by tobias »

There is actually a way to do it from python. Would that be an option, to connect it with USB and then run a python program? You could alter this example to do what you want I think?
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: EEPROM Reset

Post by whoenig »

Excellent idea, Tobias. I actually used a variant of that script before to change things over-the-air, so I am sure that will work.
I would like to write-up more step-by-step instructions for that though. Where would be a good place in the wiki to put it: https://wiki.bitcraze.io/projects:crazy ... ding:index or maybe https://wiki.bitcraze.io/doc:crazyflie:dev:starting ?

Thanks,
Wolfgang
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: EEPROM Reset

Post by tobias »

Awesome if you could write some instructions. Can't say there is a good category to put it in right now but I prefer the https://wiki.bitcraze.io/doc:crazyflie:dev:starting for now and we can move it later.
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: EEPROM Reset

Post by whoenig »

I tried it and it works great. I created a pull request for a small bug in the script and added the instructions to the wiki here.
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: EEPROM Reset

Post by tobias »

Great and thanks for the fix and instructions!
giandoman
Member
Posts: 37
Joined: Wed Sep 27, 2017 1:23 pm

Re: EEPROM Reset

Post by giandoman »

Hello everybody, i have an issue with a crazyflie.
I turn it on but only one blue led2 is on. I try to put in in DFU but only the led2 starts to blink. so i tried to reset the eeprom but when i run the code it is not able to find my crazyflie connected to the usb.
Any suggesstion?
Thanks
Gianni
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: EEPROM Reset

Post by arnaud »

Hi Gianni,
How did your Crazyflie end-up in this state?
It seems that the STM32 needs to be re-flashed. You can do that by putting your Crazyflie in bootloader mode (pressing the switch for about 3 seconds) and flashing a released firmware.
giandoman
Member
Posts: 37
Joined: Wed Sep 27, 2017 1:23 pm

Re: EEPROM Reset

Post by giandoman »

Hi Arnaud, thanks for the reply. I don't know how it happened. We work with the drones at the university with students probably one of them last year did something wrong. I'm starting to handle the drone lab now so I'm not so fully expert (Still).
I was doing the inventory of our bit craze stuff and I've found this drone with this issue.
When I press the switch to put the drone in boot loader mode, just led 2 starts to blink. Actually when I start the client and scan for devices it founds the drone in boot loader, but when I try to flash a firmware it it doesn't work.
giandoman
Member
Posts: 37
Joined: Wed Sep 27, 2017 1:23 pm

Re: EEPROM Reset

Post by giandoman »

giandoman wrote: Tue Oct 03, 2017 5:54 pm Hello everybody, i have an issue with a crazyflie.
I turn it on but only one blue led2 is on. I try to put in in DFU but only the led2 starts to blink. so i tried to reset the eeprom but when i run the code it is not able to find my crazyflie connected to the usb.
Any suggesstion?
Thanks
Gianni
Btw I tried to reset the eprom of a working drone and it only did with the crazy radio dongle connected. On the instruction it is written that the drone have to be connected via USB, but in such way it doesn't work :?:
Post Reply