nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NRF52DK stops without the debagging processes turned on?

Hello all,

I have made a simple app that runs in loop on the nRF52DK, in general it reads data from the sensor via twi and turns on the leds  ...

When the program is run within the Segger studio the data is observed, for example, data is read by the printf() and displayed on the debugger windows, all good, however, if this debugging is stopped, the nRF52DK is then run individually without the Segger studi... it stops after 10 or so seconds, it freezes. Until, the reset on the nrf is pressed, then it boots up and starts running again from beginning, it works, but for only another 10 sec or so...

What am I missing? I am sure there is a setup to avoid this, or am I doing something wrong?

Looking forward to any comments, suggestions, solutions you may have.

Best.

Parents
  • Hi,

    Are you using RTT logging? If you do, have you configured this to BLOCK_IF_FIFO_FULL in your sdk_config.h file?

    // <o> SEGGER_RTT_CONFIG_DEFAULT_MODE  - RTT behavior if the buffer is full.
     
    
    // <i> The following modes are supported:
    // <i> - SKIP  - Do not block, output nothing.
    // <i> - TRIM  - Do not block, output as much as fits.
    // <i> - BLOCK - Wait until there is space in the buffer.
    // <0=> SKIP 
    // <1=> TRIM 
    // <2=> BLOCK_IF_FIFO_FULL 
    
    #ifndef SEGGER_RTT_CONFIG_DEFAULT_MODE
    #define SEGGER_RTT_CONFIG_DEFAULT_MODE 0
    #endif

    If not, what are you doing in your application? Is there any errors reported before the "freeze"?

    Best regards,
    Jørgen

  • Hello Jørgen

    Thank you for your help.  Indeed, the RTT is used to print out the values that are obtain from the sensor.

    Previous configuration:

    //
      // Configure J-Scope RTT buffer for THREE unsigned ints
      //
      SEGGER_RTT_ConfigUpBuffer(JS_RTT_Channel, "JScope_U4U4U4", &JS_RTT_UpBuffer[0], sizeof(JS_RTT_UpBuffer), SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL);

    And current configuration:

     SEGGER_RTT_ConfigUpBuffer(JS_RTT_Channel, "JScope_U4U4U4", &JS_RTT_UpBuffer[0], sizeof(JS_RTT_UpBuffer), SEGGER_RTT_MODE_NO_BLOCK_SKIP);

    This is now working!

    Best.

Reply
  • Hello Jørgen

    Thank you for your help.  Indeed, the RTT is used to print out the values that are obtain from the sensor.

    Previous configuration:

    //
      // Configure J-Scope RTT buffer for THREE unsigned ints
      //
      SEGGER_RTT_ConfigUpBuffer(JS_RTT_Channel, "JScope_U4U4U4", &JS_RTT_UpBuffer[0], sizeof(JS_RTT_UpBuffer), SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL);

    And current configuration:

     SEGGER_RTT_ConfigUpBuffer(JS_RTT_Channel, "JScope_U4U4U4", &JS_RTT_UpBuffer[0], sizeof(JS_RTT_UpBuffer), SEGGER_RTT_MODE_NO_BLOCK_SKIP);

    This is now working!

    Best.

Children
No Data
Related