Open hathach opened 4 years ago
For the 832 boards with no automatic reset circuitry and off-board serial, would it be possible to enable double-reset to enter DFU mode? Perhaps as an optional define option to set in the board.h file. In previous releases, we could just press reset just in time when we were uploading to the board. However, recently, the success rate of catching the 1000ms DFU window is pretty small.
double reset is not possible with 832, Nordic did very hard job spending extra logic gates to make sure every bit of SRAM cleared upon reset.
Humm. Do you mean that a pin reset clears the GPREGRET register? That would indeed be problematic.
Could we leverage the RESETREAS register and detect if the reset reason was from the reset pin being triggered? Depending on the reason, we could use different timing between DFU mode on bootup and DFU mode on pin reset. Take for example, extend DFU_SERIAL_STARTUP_INTERVAL to 10 seconds on a pin reset and keep it short for other reasons. This would also allow to completely bypass DFU (or making it 10ms) on restart when waking up from sleep (making keyboards more responsive)
We may consider doing this as a non-feather/generic nrf52832 board so that it doesn't break the feathers of most people... (just in case I guess...)
Humm. Do you mean that a pin reset clears the GPREGRET register? That would indeed be problematic.
Yes?
For reset reason, you can try it out to see what fit your need. For more questions that is not related to the button usage, please post it in our forum support.
I'll probably give it a try. However, it's just one more thing on my long to-do list...
On Mon, Jul 27, 2020 at 9:38 PM Ha Thach notifications@github.com wrote:
Humm. Do you mean that a pin reset clears the GPREGRET register? That would indeed be problematic.
Humm. Do you mean that a pin reset clears the GPREGRET register? That would indeed be problematic. For reset reason, you can try it out to see what fit your need.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/adafruit/Adafruit_nRF52_Bootloader/issues/121#issuecomment-664757270, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIYW6HZOPXKSCCXFMAGR63R5ZB4JANCNFSM4MPYZXWA .
-- Pierre
I just configured a new 832 board that doesn't have reset circuitry and having a button to enter DFU is very useful before flashing from the Arduino IDE. It's a simple as pressing "BUTTON_1", Pressing and releasing "Reset" followed by releasing "BUTTON_1". This leaves the nrf52832 chip in DFU mode and the Arduino IDE is happy to flash a new sketch.
(I might be stating the obvious but this highlights the importance of "BUTTON_1" for boards that don't have serial normally installed or that don't have the reset circuitry.)
832 will always have hold-button1 to DFU mode. Double reset is only possible with 840. Anyway, these should be configured via specific board header.
Double tap into USB + BLE would be awesome
@hathach
Is the "clear user firmware and remain in bootloader mode" function defined in
actually implemented and working ?
Is your feature request related to a problem? Please describe. Currently usage of bootloader is confusing and require 2 GPIOs which is quite a lot.
Describe the solution you'd like FRST seems to be not needed since enter bootlaoder is easy enough, and user can just flash a known good firmware should their application corrupt. Therefore
Describe alternatives you've considered A better button-less for 840 is start both USB and OTA mode whenever enter bootloader. That would be optimal if we could that off.
@dhalbert @tannewt @PaintYourDragon for comments.