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. 

  • 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.

Reply
  • 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.

Children
  • Hi Ivo, 

    So both of the board are not detectable ?

    On the "not broken" one , can you put it to the DFU mode by pressing the reset button (the one on the side not the bigger oen) would it switch to DFU mode (LED grows red) ? 

    You don't need an external programmer to access the chip when it's in DFU mode. It should work with nRF Connect. 

    But if you have a programmer or a NRF5 DK you can use the DK to program the dongle directly. You would need to solder a 10 pin header on P1 port and use the 10pin cable like this one to program it from the Debug out port of the NRF5 DK. 

    https://www.adafruit.com/product/1675

    If you can program the dongle directly you don't need to use the DFU mode and can use the dongle the same way as the DK. 

  • Just to make it clear. I had one nrf52840 dongle which I could program via pressing the button (the one on the side), it started to heartbeat with glowing the diode red and I could program it. After some action this dongle does not heartbeat glow RED diode any more after pressing the button it somehow randomly flashes red, but obviously does not enter DFU mode.The only way I can program this dongle is via OpenOCD since the DFU mode is broken.

    Since I want to compare the broken dongle with a working piece I bought yesterday another one which enters the DFU mode correctly.

    In order to enter DFU without pressing the button, I downloaded NRF Connect for Desktop for Linux, but I do not know how to enter the DFU mode. What I did so far.

    I plugged the fully working nrf52840 dongle into USB,started nrf connect for desktop and opened the Programmer but in the log window I see a red line with this statement (obviously loading a windows library).

    Failed to get the library versions: JLINKARM_DLL_COULD_NOT_BE_OPENED (Origin: "Failed to get module versions.")

    But do not see my dongle anywhere.

    After physically pressing the reset button I see my device when pressing the arrow on the right side of button with label "SELECT DEVICE", moreover another error appears:

    Error when fetching device versions: readFwInfo error (Origin: "Error when running nrfdl_fw_read_info")

    Now I see my device as /dev/ttyACM0

    I did not plugin my faulty USB dongle yet, so far working with the fully working one.

    But I see my device only after manually entering the DFU mode, but the goal is to enter DFU mode in the software and I do not know why that is why I am asking whether I need a STLINK/SEGGER probe for that, since I do not see any button/switch/command how to enter the DFU mode in software.

  • It is programmer of version 3.0.3

    Supported engine NRF Connect:

    3.11.1

  • There is a value of 3V on the left side of the  reset button (having the USB connector on the left side) and 0V on the right side of the reset button in both DFU and normal mode.

    The same applies to my corrupted dongle, also 3V on left side and 0V on right side.

    I can measure some other voltage readings but I would love to have some hint what could be the possible fault.

    Now I have uploaded stock firmware from Nordic on my faulty dongle. It seems like upon RESET button press or plugging in the dongle into USB port it tries to glow the diode like in DFU mode, but immediately it turns to that weird red random flashing. Moreover the NRF Connect for desktop does not see the device at all, seems like the dongle really does not enter the DFU mode.

    Sorry to waste your time repairing dongle for 10$, but it is more of a getting to know what the problem actually is and to learn a bit more from my own mistakes.

  • I also experience this strange behaviour. When connecting to OpenOCD, I connect the device to Raspberry via USB HUB. But many times I see the output of OpenOCD:

    Error: Error connecting DP: cannot read IDR

    This means the board is not connected but obviously it is plugged in USB port.

    Many times the board is connected to OpenOCD, I can read the status, but I cannot erase the memory and I cannot flash the memory, it looks like it is connected but it is doing weird things. The only way how can I overcome these issues it that I hold the board tightly in USB port but this is strange, it used to work without any pressing the board firmly, it was just plugged in the USB port and I could happily flash it over OpenOCD.

    Could it be that the internal voltage regulator is doing some nasty things?

    But the fact that my program runs very find whenever I plug the dongle to USB does not support this hypothesis.

    Just now I remembed that experienced this fast random RED light flashing when there was something wrong with the powering of the board, it looked like to board detected malformed input voltage and it started to flash RED fast.

    Do you happen to know if there is any piece of information what the regular fast RED light flashing means? The fast red light looked random to me, but now I see that it might be pretty regular, just much faster than when entering DFU mode, it seems like when trying to enter DFU mode, it might check the voltage regulator or some voltage level and if it is wrong then it refuses to enter DFU just to protect from flashing the memory inconsistently and signals the error via fast red light flashing.

    Could there be something wrong with the internal voltage regulator? Isn't there any log I can trace what is happening exactly?

Related