cannot enter bootloader mode on nrf52840 dongle anymore

Dear all,

I could happily flash my firmware to my nrf52840 upon pressing reset button. When pressing the reset button the diode on the board started to beat red and via command:

nrfutil dfu usb-serial -pkg blinky.zip -p /dev/ttyACM0

I could easily write a new firmware.

Today I found a pair of scissors accidentally touching my board on GPIO pins, I immediately removed the scissors knowing it could potentially damage the board via short circuit. I removed the board from USB port and plugged it back. The application written on the flash is working correctly, it is a bluetooth flash button service, which can be controlled via Android app NRF Blinky. The diode can be controller correctly, it flashes upon command and also the button sends notification to my Android phone. So far it seems allright.

BUT, after I long press the reset button to enter bootloader mode, the diode does not glow read like heartbeat anymore, it tries to glow red and starts flashing red randomly like a current it flowing throught the diode randomly. Therefore I cannot write any new firmware to my board.

Moreover, I used to recover my dongle when accidentally locking my nrf52840 via OpenOCD, but right now, it cannot even connect to the device yielding:

Error: Error connecting DP : cannot read IDR

Does anyone know how to resolve this issue?

I suspect I damaged partially my board shortcutting it but I still wonder wheter there is a sort of a utility I can verify what is wrong exactly with my board. Just the bootloader might be corrupted but it is very suspicious that OpenOCD cannot communicate with the MCU via OpenOCD anymore.

Thank you very much

Parents
  • I forgot o mention that I am connecting the dongle via two wire SWD connection (swdio and swd clock),connected to gpio pins 6 and 12 on Raspberry Pi Zero and on Pi Zero,OpenOCD is running.

    It seems like I cannot access the chip via SWD and I does not seems like the AP is locked as it used to connect even though the AP was locked but now it cannot read anything via SWD.I will also recheck SWD wiring.

  • Hi Ivo, 

    You may want to send a picture of your setup so we can see if there is anything wrong. 

    I also suspect that there could be some issue with the hardware. But it's strange the your application still running fine. 

    Please make sure you have connected a common ground between the RPI and the dongle. 

  • Dear sir,

    you were completely right with the fact that it is strange the application is still running. Finally I resolved the problem with OpenOCD. Please keep in mind that all the attempts of detecting and flashing the unit were done in OpenOCD as I cannot enter the standard bootloader mode.

    The dongle is somehow very VERY sensitive to how it is plugged in to the USB port, I had to press the board to make sure it has contacts with USB pins, moreover it even looked several times it is connected to USB properly, but it was NOT. It was detecting the core, but I was unable to reset, resume or init the core (probably due to some USB supply voltage level fluctuations) so I assumed the board is completely dead but after pushing the board firmly to the USB port I was able to even flash the board with stock Nordic firmware via OpenOCD. BUT....

    after flashing the stock firmware, the board tried to flash like heartbeat (entering bootloader mode) but immediately turned to that random weird red flashing. anyway, flashing with my own image via OpenOCD also works, but I cannot flash via pressing the reset button to enter bootloader mode. The only way I can reflash the image is via openOCD.

    To sum it up, I guess there is probably something wrong with the button itself. I do not know how the board enters bootloader mode, but it somehow cannot enter the mode. Maybe there is a condenser or any other electric part damaged and it's behavior after the button press causes unpredictable behavior but far from reaching the desired state of bootloader.

    Would you be so kind to help me resolve what happens when pressing the button or which readings on electric parts I am supposed to have?

    anyway, I am buying another nrf52840 dongle to compare the readings on electric parts on the faulty board and on the newly purchased board when pressing the reset button, it is handy to have a backup anyway.

  • Hi Ivo, 

    The way the board enter DFU mode is by checking if the booting was from a pin reset or not. 

    The pin reset is controlled by either the button SW2 or by the GPIO pin P0.19 (and also P0.21, P0.23, P0.25). Please avoid using these pins in your application. 

Reply Children
  • Actually, I did not use any of them, I guess they are not even exposed on the board.

    Do you have any idea what could get wrong when pressing the reset button? I mean, what could have gone wrong that it does not enter the DFU mode and the diode just flashes randomly, not like the regular RED LED glow after entering DFU mode.

  • Actually,do you happen yo know if there is any way how to check the pin reset works as expected?Lets say,which voltage level on which part should I meaure and reading should I get phen pressing the switch button.

    Or is there any other way I can switch yo bootloader mode apart from that reset button switch?This way I can verify that the bootloader works fine and the problem is somewhere on the physical board.I guess the reset button brings some voltage on the reset pin.

  • Oh,now I see I can activate the DFU mode from NRF Connect for desktop without pressing the reset button.

  • Hi, 
    Could you confirm that it works with the nRF Connect for desktop to put the chip to DFU mode ? 
    Actually the way nRF Connect for Desktop work is to send a command to the USB interface so that the application firmware trigger a pin reset using P0.19 . 
    So it's almost the same as pressing the reset button but via software. 
    I think there must be something wrong with the hardware on the board maybe some kind of short  on one of the pins ? 

  • I would like to,but NRF Connect does not detect any of my two boards.Actually,the not broken ones shows something but I am facing an error message that the software cannot read firmware version.

    I do not have any ST Link or Segger probe?Is it necessary to have such a probe to enter the USB dongle DFU mode via nrf Connect (without physically pressing the reset button) or just plugging in the dongle to USB is the only necassary condition to be able to enter DFU mode via nrf connect?

    I checked the voltage on reset button and pressing the button exposes the internal pi (you say p0.19) to GND voltage,assuming you say the pin could be shortcutted to groung,the chip will be resetting all the time not being even able to run my code,right?

    If the shortcut voltage would be different from GND voltage,does the DFU mode check for a certain voltage level in DFU mode or isn't the the RED heartbeating diode feeded from the pin 0.19 in DFU mode?I will compare voltages on the other side of the button in DFU mode for both of my dongle,it the voltage on the broken on differs,there is probably something wrong.

Related