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

Can't run program unless using debugger (ST-LINK V2 and OpenOCD)

I'm trying to make the sample beacon in my custom nrf52832 board, builded by Segger Embedded Studio.

The code runs fine when I'm connected to the device with the OpenOCD, but as soon as I disconnect it and try to use only external power, it doesn't run.

Is there a specific configuration I need to change on the Segger Studio builder, or is it a hardware pin that I have to pull? I already pulled pin nRESET to 3V3, but it doesn't affect anything.

Thanks in advance,

Arthur Käfer

Parents
  • Hi,

    We officially support J-link not ST-link. But, I don't think your issue is related to the kind of debugger that you're using.

    First of all, exactly how are you determining that the application isn't running when you disconnect the debugger? How is the board supplied? Have you checked that VDD is within the correct operating region when you disconnect the debugger. Please upload the schematics if you're using a custom board ( I can make the ticket private first if you prefer it).

    regards

    Jared 

  • Hi,

    I'm running a simple iBeacon example, and to check if the application is running, I scan for devices that match the UID I set on the main file. The board can be supplied by 2 AA batteries or a 3V3 external power, but I was using 3V3 external when debugging. 

    VDD had 3.28V when debug was both connected or disconnected. I enabled a LED on the board to check for errors and to check the start of the program, but nothing seemed to work. 

    I don't remember where I read, but someone had the same problem here and he suggested to remove all types of printk on the program, and it actually worked, I don't know how.

    Thanks for the reply, Jared

    Arthur Käfer

  • Hi again,

    Are you using the SDK or NCS, and what version are you using? And do you have an external crystals on the board?

     

    arthurkafer said:

    I don't remember where I read, but someone had the same problem here and he suggested to remove all types of printk on the program, and it actually worked, I don't know how.

     Well, are you using any kind of logging? If so, what backend are you using, RTT?

    I have seen some similar cases where the board doesn't start without the debugger due to semi hosting being used. But this is usually related to older SDKs such as v11 and older. 

    Are you seeing the same behavior if you flash one a simple SDK example such as ble_app_blinky? It might be that the board is asserting in your application. 

    regards

    Jared 

  • I'm using some nRF Connect SDK projects, 1.4.0-rc1 release, and yes, I have an external crystal on the board, but it is not really been used on the project right now. 

    Well, are you using any kind of logging? If so, what backend are you using, RTT?

    I actually don't know how to use RTT and other types of logging, I was just using a LED in my board to check for errors in the code. The blinky example worked fine, just the iBeacon example that was with the problem.

  • Hi,

    You're referring to this IBeacon example?

    Could you check if the DC/DC is enabled? Some of examples uses this as a default which will make the nRF assert if the external filter isn't included. 

    You can check this by reading the DCDCEN register after you've flashed the application:

    nrfjprog --memrd 0x40000578

    The DCDC can be disabled by adding this to the config file:

    CONFIG_BOARD_ENABLE_DCDC=n

Reply Children
No Data
Related