This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Programmation Error due to Reset pin ?

Hi,

I'm using nrf52833, flashed by using Jlink SWD programmer. I have no probleme to re-programmed 2/3 of my board.

But the hird gave an error. The strange things is that it is still running. I have the feeling that the programmed is started , and impossible to come back in programmation mode.

I have tried a fourth board, and same issue.

I thought to a power supply issue, so i decided to use the simplest hardware possible , +vcc, gnd, reset, swdio swclk.

When i try to flash, SES show this error message, that point me to the supply issue after some research on the forum. But now i'm supplying direct with a nice power supply direct on the vss of my board so no probleme with that.

So i tried to check with commander Jlink and it point me to a reset pin issue. On board 3 , it is not to show me there is a software inside, altouhgt the software run properly, advertise etc...

J-Link>connect
Device "NRF52833_XXAA" selected.


J-Link>connect
Device "NRF52833_XXAA" selected.


Connecting to target via SWD
InitTarget() start
InitTarget() end
RESET (pin 15) high, but should be low. Please check target hardware.
RESET (pin 15) high, but should be low. Please check target hardware.
RESET (pin 15) high, but should be low. Please check target hardware.
RESET (pin 15) high, but should be low. Please check target hardware.
RESET (pin 15) high, but should be low. Please check target hardware.
RESET (pin 15) high, but should be low. Please check target hardware.
RESET (pin 15) high, but should be low. Please check target hardware.
InitTarget() start
InitTarget() end
RESET (pin 15) high, but should be low. Please check target hardware.
InitTarget() start
InitTarget() end
RESET (pin 15) high, but should be low. Please check target hardware.
RESET (pin 15) high, but should be low. Please check target hardware.
InitTarget() start
InitTarget() end
RESET (pin 15) high, but should be low. Please check target hardware.
Cannot connect to target.

On board four i have this message showing it can read a software version, but still can't reprogramme the chip...

 

Connecting to target via SWD
InitTarget() start
InitTarget() end
RESET (pin 15) high, but should be low. Please check target hardware.
Found SW-DP with ID 0x2BA01477
Failed to power up DAP
RESET (pin 15) high, but should be low. Please check target hardware.
InitTarget() start
InitTarget() end
RESET (pin 15) high, but should be low. Please check target hardware.
Found SW-DP with ID 0x2BA01477
Failed to power up DAP
InitTarget() start
InitTarget() end
RESET (pin 15) high, but should be low. Please check target hardware.
RESET (pin 15) high, but should be low. Please check target hardware.
RESET (pin 15) high, but should be low. Please check target hardware.
RESET (pin 15) high, but should be low. Please check target hardware.
Found SW-DP with ID 0x2BA01477
SWD speed too high. Reduced from 4000 kHz to 1518 kHz for stability
Failed to power up DAP
RESET (pin 15) high, but should be low. Please check target hardware.
InitTarget() start
InitTarget() end
RESET (pin 15) high, but should be low. Please check target hardware.
Found SW-DP with ID 0x2BA01477
Failed to power up DAP
Cannot connect to target.

I have destroyed my production board by thiking it ws linked to some power supply multiplexor that were may be broken...

I also see reset pin that can be a gpio. I don't use this pin and it seems to not be used in my software too. The fact to not have issue with the two first board is also strange, and the fact board 3 and 4 doesn't eact in the same way is a bit strange, as board 3 boot and works fine.

My software use dfu .

I try also with nrfconnect and i get this message : 

I'm a bit loast and have the feeling that it is not robust enough to go in production with that, may be something i don't manage is missing..

Parents
  • Hi,

    You only need to connect swdio, swdclk, gnd and vdd (vtarget). There is not need to connect reset pin. However if you have (by accident) enabled pin reset, then I recommend to connect p0.18 directly to vdd, and execute an 'nrfjprog --recover' or 'nrfjprog --eraseall' to make sure that uicr is erased and pin reset disabled again.

    Best regards,
    Kenneth

  • HI Kenneth,

    Thanks for the fast reply.

    No CONFIG_GPIO_AS_PINRESET defined in my code , so, should not be used .

    I tried in command line but i think something is not clear with installation or DLL :

    >nrfjprog --recover
    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.

    I have then used the segger utility J-Link Utility DLL Updapter that seems to list one item to update without really do it i think because when i re load it do the same ( i run in administrator mode):

    As i have seens that it update in SES forder ,  i retry to flash with SES and now board 4 is updated !

    So i don't know what is really the problem but it seems to works, at least with SES.

    For command line i don't know why it makes an error.

Reply
  • HI Kenneth,

    Thanks for the fast reply.

    No CONFIG_GPIO_AS_PINRESET defined in my code , so, should not be used .

    I tried in command line but i think something is not clear with installation or DLL :

    >nrfjprog --recover
    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.

    I have then used the segger utility J-Link Utility DLL Updapter that seems to list one item to update without really do it i think because when i re load it do the same ( i run in administrator mode):

    As i have seens that it update in SES forder ,  i retry to flash with SES and now board 4 is updated !

    So i don't know what is really the problem but it seems to works, at least with SES.

    For command line i don't know why it makes an error.

Children
  • Ok it was not working on board 3 anymore, so i just connect RESET mu pin to vdd, and now i can flash and debug again.

    So i dont' really understand why this reset pin that should not be used has an impact but it seems that i need to connect it to vdd to not have probleme and get a robust programing connexion.

    I have also chek ed in the secure bootloader if something was enable but no :NRF_BL_DFU_ENTER_METHOD_PINRESET 0

    But surprised ! when i run secure bootloader in debug mode, and also looking in the editor , even if ... was not defined, i was surprised to see the code "enable" after #if defined ! It should be light grey and not black no?

    When i search CONFIG_GPIO_AS_PINRESET in the entire solution, i see nowhere definition of this.

    But bingo ! i reminf there was some settings also in project properties:

    And same definition in my project ( based on HRS example).

    So now what can be the clean solution? remove this definition and loose the possibility to use reset with programmer ? Then how can i reset during debug ? I have seens in Segger documentation several strategy to manage reset. 

    Or keep it , and use may be a king of pull down resistor or something like this ?

    And if i disable this option , i guess i have to disable it in both bootloader and application ?

    Thank you !

  • You can remove the CONFIG_GPIO_AS_PINRESET define, you will still be able to program, soft reset and debug using the SWD interface (e.g. using SEGGER j-link). You should remove CONFIG_GPIO_AS_PINRESET define from both bootloader and application code yes if you intend not support pin reset. If you enable it you must ensure that the pin in question is not used (e.g not configured as output low) by the application or bootloader. This may cause a continuous reset loop.

  • OK thanks for confirmation, it is what i did , seem to work fine. That's crazy i didn't had issue on some board, but i have to admit that sometimes i had random behavior. Anyway i'm happy to have solved the probleme with your help. I hope this ticket will be usefull for other people too.

    Thank you !

Related