boards/nrf52840dongle: enable automatic reset to bootloader#14258
boards/nrf52840dongle: enable automatic reset to bootloader#142581 commit merged intoRIOT-OS:masterfrom
Conversation
I think you lost something along the way. Or am doing something wrong? (I use 14212) |
bb1d941 to
d3df8f5
Compare
|
Oh yea sorry, I forgot |
|
Ah turns out this does not work: https://devzone.nordicsemi.com/f/nordic-q-a/48151/enter-bootloader-from-app-on-stock-nrf52840-dongle/191333#191333 But we can trigger the bootloader reset using a GPIO. |
|
Does this work? |
|
I pressed reset and flashed There was a "No Response" python error raised by nrfutil:
|
|
You should have Does anything change if you remove that |
3d166cf to
23ee1b7
Compare
|
This should work now. Btw.: The nrf52 watchdog supports executing a callback, so you can register |
ghost
left a comment
There was a problem hiding this comment.
That works!
I was just about to run dmesg to see what was going on when you added the new commit.
With the old commit, there was no reconnection when flashing, although the bootloader should have been loaded.
With this commit, when flashing it now reconnects to the active bootloader, then flashes, and then reconnects with a loaded riot program.
Also, there is now the bootloader command (in examples/default), with which it reconnects to the loaded bootloader as desired. Well done.
It's a bummer you already squashed; I'd like to have read the latest changes.
Anyway, works and code looks good.
ACK
|
Ah sorry - I removed the |
|
Wait a second, This won't work when flashing for the first time, right? |
Actually I got some of these When I first plugged them in they were already in bootloader mode, but I added a note regardless since we have to use the button if RIOT crashed. |
391dfb4 to
b20f98e
Compare
|
Docs look good. All green, so I'll merge now. Thank you for your contribution! |
I will be very suprised if you get them to run on normal AA batteries for a long time. My experiences with batteries are bad, even with long sleep cycles. Well I use LEDs a lot, so maybe thats were my power goes. Keep me updated if you try it out. :D |
I bet that's where your power goes indeed. A sleeping MCU uses about 3 uA whereas an LED uses 1-10 mA so as long as there's an LED on it almost doesn't even matter if the MCU is sleeping. Years on AA cells is the right order of magnitude. Coin cell batteries can get troublesome because they aren't actually rated for the 20 mA of a running MCU and radio so you have to derate the capacity some, but AA easily get their rated capacity and the bigger concerns end up being self-discharge (if NiMH) or electrolyte leaking (if alkaline). Self discharge can be solved by switching to alkaline, and leaking can be solved by ensuring that you reduce your power consumption to the nA range when the battery is about to become completely depleted. |
Contribution description
There was a brief discussion about this in #13146. I view it as a great convinience being able to flash a board without any physical interaction.
Now I did not test this since I don't have such a board, but having moved the board reset logic to a common place now, this should just work™ on these boards too.
Testing procedure
make flashAgain, I did not test this, so please give this a try.
Issues/PRs references
requires ddf407e from #14212