nrfjprog --program failed: Encountered error -102:

Hi,

I am using nRF52-DK to program a custom board based on BC832 (nRF52832 SoC).  I recently updated "nRF Connect for Desktop" and associated applications. I believe some of the drivers also got updated. After the updates I was not able to program the BC832 on the custom board nor the nRF52832 SoC on the DK itself. After updating the JLINK drivers and turning on Legacy Support, now, I am able to program the nRF52832 on board the DK but not on the target board. I am using a 10-pin SWD interface as shown below (with SB32 shorted):

I also purchased a new nRF52-DK board with Board version PCA10040.

My OS: Windows 11

My JLINK driver: V798f (64-bit) - Legacy Support Enabled 

Programming Tools used:

 - nRF Connect for Desktop -> Programmer (V4.4.0)

 - nrfjprog (Command line) (v 10.24.2)

 - nRF Connect for VS Code

I have two custom boards. One has a firmware loaded prior to software updates and the problems. The other has BC832 with factory FW. Both present different errors and corresponding logs. I have collected log files for my attempts at programming and recovering the two custom boards.

nRF52_DK_error_logs.zip

 

The log file for the case where I can successfully upload the hex file to the nRF52832 on-board the DK is given below:

program_DK_NO_ERROR_log.log

I need help urgently. I believe I have tested all the relevant solutions that I could find on the forums and Q&As but none of them worked for my custom boards.

Looking forward to your suggestions.

Regards,

Omar 

Parents
  • Hi Omar, 
    Could you try to do a nrfjprog --recover before programming ? 

    Have you disabled APPROTECT ? If you don't then it's not possible to write to UICR (pinresetenable) after the program is running (after resetting the board). 

    Could you try to test with 2DKs as I suggested? 
    Please make sure the debug cable is not too long. 
     

Reply
  • Hi Omar, 
    Could you try to do a nrfjprog --recover before programming ? 

    Have you disabled APPROTECT ? If you don't then it's not possible to write to UICR (pinresetenable) after the program is running (after resetting the board). 

    Could you try to test with 2DKs as I suggested? 
    Please make sure the debug cable is not too long. 
     

Children
  • Hello Hung,

    Yes I have disabled APPROTECT in the code. I confirm that running the "nrfjprog --pinresetenable" works fine when the application is running on the target board.

    I don't have two nRF52 DKs however I have a BC832-DK. I am able to program the BC832 on that board without any issues. 

    Starting the application code on the custom board remains shoddy though. Application code only starts after the pinresetenable fails and I press the reset button. It sometimes takes multiple tries before pinresetenable fails.

    Regards,

    Omar

  • Please let me know if you have tried nrfjprog --recover

    Other than that I'm quite out of idea why pinresetenable  makes any difference. I would suggest to get hold of another DK. So that you have a good reference to your board. 

  • Yes I have tried the "nrfjprog --recover". It works but does not make any difference.

    Thanks for your help in getting to this point. At least I can program and test the boards.

    Later on I might start another ticket for the "application code not starting properly" issue. Maybe this issue is related to the custom board. It is a very small 4-layer PCB.

    Regards,

    Omar

Related