Jlink RTT Viewer not working with NRF52832

I am using NRF52832 DK, SDK 17.1.0, S132 Softdevice, Segger 5.42a and rtt viewer v7.62.

I am using blinky code from example.After building and debug the code I disconnect the board and reconnect it through external
rtt but it does not show any output though LOG shows: RTT Viewer connected. I tried with different board it works but it does not work with NRf52832 DK.

Below are my rtt viewer settings

Thanks & Regards

Meet Shah

Parents
  • Hi Jared

    Thank for your response

    I am using the same firmware on both the boards. No I have not modified blinky example. The other boards which i have tried are NRF538340 and NRF52833

  • The ble_app_blinky example will use the UART as backend for the logger module not RTT:

  • Hi Jared

    instead of blinky example i am referring to twi_sensor example as i wanted to work with rtt. I have totally modify the code to simple one and in sdkconfig i have have enabled  NRF_LOG_BACKEND_RTT_ENABLED 1,NRF_LOG_ENABLED 1 and NRF_LOG_BACKEND_UART_ENABLED 0 to use rtt instead of uart.

    The modified code is

    #include <stdbool.h>
    #include <stdint.h>

    #include "nrf.h"
    #include "nordic_common.h"
    #include "boards.h"
    #include "nrf_delay.h"
    #include "nrf_log.h"
    #include "nrf_log_ctrl.h"
    #include "nrf_log_backend_rtt.h"
    #include "nrf_log_default_backends.h"


    /**
    * @brief Function for application main entry.
    */
    int main(void)
    {

    // Initialize the Logger module and check if any error occured during initialization
    APP_ERROR_CHECK(NRF_LOG_INIT(NULL));

    // Initialize the default backends for nrf logger
    NRF_LOG_DEFAULT_BACKENDS_INIT();

    // print the log msg over uart port
    printf("This is log data from nordic device..\r\n");
    NRF_LOG_INFO("This is log data from nordic device..\r\n");

    // a variable to hold counter value
    uint32_t count = 0;


    while (true)
    {

    // Dsiplay the logger info with variable
    printf("Counter Value: %d \r\n", count);
    NRF_LOG_INFO("Counter Value: %d \r\n", count);
    nrf_delay_ms(500); // delay for 500 ms
    count++; // increment the counter by 1
    }
    }

    Before diconnecting I get logs in RTT viewer but after diconnecting DK and again connecting not logs are shown

    Output before disconnecting

    After disconnecting and again connecting

Reply
  • Hi Jared

    instead of blinky example i am referring to twi_sensor example as i wanted to work with rtt. I have totally modify the code to simple one and in sdkconfig i have have enabled  NRF_LOG_BACKEND_RTT_ENABLED 1,NRF_LOG_ENABLED 1 and NRF_LOG_BACKEND_UART_ENABLED 0 to use rtt instead of uart.

    The modified code is

    #include <stdbool.h>
    #include <stdint.h>

    #include "nrf.h"
    #include "nordic_common.h"
    #include "boards.h"
    #include "nrf_delay.h"
    #include "nrf_log.h"
    #include "nrf_log_ctrl.h"
    #include "nrf_log_backend_rtt.h"
    #include "nrf_log_default_backends.h"


    /**
    * @brief Function for application main entry.
    */
    int main(void)
    {

    // Initialize the Logger module and check if any error occured during initialization
    APP_ERROR_CHECK(NRF_LOG_INIT(NULL));

    // Initialize the default backends for nrf logger
    NRF_LOG_DEFAULT_BACKENDS_INIT();

    // print the log msg over uart port
    printf("This is log data from nordic device..\r\n");
    NRF_LOG_INFO("This is log data from nordic device..\r\n");

    // a variable to hold counter value
    uint32_t count = 0;


    while (true)
    {

    // Dsiplay the logger info with variable
    printf("Counter Value: %d \r\n", count);
    NRF_LOG_INFO("Counter Value: %d \r\n", count);
    nrf_delay_ms(500); // delay for 500 ms
    count++; // increment the counter by 1
    }
    }

    Before diconnecting I get logs in RTT viewer but after diconnecting DK and again connecting not logs are shown

    Output before disconnecting

    After disconnecting and again connecting

Children
Related