Recover nrf5340 (MDBT53) custom board

I am using custom board with MDBT53 and I'm stuck at a point where board does not even let me to connect the debugger so that I can refresh firmware. 

I added MCU boot code into my existing firmware and once I flashed this mcu boot code to my board I got my board into state that its not powering up the board and not letting me to connect the debugger. When I try to flash the code via JFlash v8.28 it gives following error.

Then I search and got some idea from forum that if I use nrfutil or nrfjprog I can recover it but I will share the response for these commands as well which seems not working for me.

nrfjprog --recover --coprocessor CP_NETWORK
[error] [  nRFXX] - Device does not have an ARM debug port.
[error] [  nRFXX] - Device does not have an ARM debug port.
[error] [ Client] - Encountered error -3: Command enable_coprocessor executed for 6 milliseconds with result -3
ERROR: NETWORK coprocessor is invalid on UNKNOWN family devices
[error] [ Worker] - NETWORK is not a valid coprocessor for the device
ERROR: An invalid argument was provided. Use --help for a list of valid
ERROR: arguments.
NOTE: For additional output, try running again with logging enabled (--log).

When run  nrfutil device recover --core Network command it gets following error:

nrfutil device recover --core Network      
❌ Failed to recover 801032098, Device error: A timeout occured while handling debug power: Timed out trying to power sys and debug region
Error: One or more recover tasks failed:
 * 801032098: Device error: A timeout occured while handling debug power: Timed out trying to power sys and debug region (Generic)

Then I also tried to connect the reset pin of board with vdd to which makes the nrf reset I believe. Then again it does not work. I get the following response with this setting. Even if I make reset to GND then again get the same response. 

nrfutil device recover --core Network
❌ Failed to recover 1050083678, Device error: Failed to write DebugPort register 0x08: Unknown Error in J-Link DLL (error code =-1)
Error: One or more recover tasks failed:
 * 1050083678: Device error: Failed to write DebugPort register 0x08: Unknown Error in J-Link DLL (error code =-1) (Generic)



nrfjprog --recover --coprocessor CP_NETWORK
[error] [ Client] - Encountered error -102: Command connect_to_emu_with_snr executed for 732 milliseconds with result -102
ERROR: Unable to connect to a debugger.
[error] [ Worker] - An unknown error.
ERROR: JLinkARM DLL reported an error. Try again. If error condition
ERROR: persists, run the same command again with argument --log, contact Nordic
ERROR: Semiconductor and provide the generated log.log file to them.
NOTE: For additional output, try running again with logging enabled (--log).
NOTE: Any generated log error messages will be displayed.

Can you suggest or tell me anything whats going on and how to fix it?

Thanks 

Parents
  • Hi, sorry for the slow response. 

    Muhammad said:
    Anyway any idea how. we can recover this or make this work again?

    To recover a board that has the been flashed with the wrong firmware you would need to supply the external pins related to DCC with power or at least get it in a state before it shuts down due to the wrong regulators being enabled. In many cases the device is bricked as the pins are not always accessible. If that is the case then it needs to be removed and either replaced or mounted to a board where all pins are available and re-programed\recovered. 

    Since you have a module you should be able to access the pins connected to the different regulators so this could possibly be solved. 

    In the code when you compile it you should be able to see if the registers for the regulators are on or off before you flash it to the device. There should be a Zephyr.dts file that is generated, maybe for the bootloader. 
    It might be that the bootloader overwrites the configs if not done correctly. 

    Regards,
    Jonathan

Reply
  • Hi, sorry for the slow response. 

    Muhammad said:
    Anyway any idea how. we can recover this or make this work again?

    To recover a board that has the been flashed with the wrong firmware you would need to supply the external pins related to DCC with power or at least get it in a state before it shuts down due to the wrong regulators being enabled. In many cases the device is bricked as the pins are not always accessible. If that is the case then it needs to be removed and either replaced or mounted to a board where all pins are available and re-programed\recovered. 

    Since you have a module you should be able to access the pins connected to the different regulators so this could possibly be solved. 

    In the code when you compile it you should be able to see if the registers for the regulators are on or off before you flash it to the device. There should be a Zephyr.dts file that is generated, maybe for the bootloader. 
    It might be that the bootloader overwrites the configs if not done correctly. 

    Regards,
    Jonathan

Children
No Data
Related