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

Logs from the QSPI application using XiP

Hi,

I want to run QSPI application example on my nRF52840DK (PCA10056) board with logs seen via UART. I successfully uploaded QSPI bootloader example and Blinky SysTick example to my board. It's running ok and I can see the logs from QSPI bootloader on the UART. 

But when I add logs to the Blinky SysTick example then the QSPI bootloader works fine (I can see the logs from QSPI bootloader), but the program from external flash crashes on line 613 in nrf_fprintf_fmt() function from nrf_fprintf_format.c file, after NRF_LOG_FLUSH() call and I can't see the logs. 

The code snippet from modified Blinky SysTick example that I use:

/**@brief   Initialize logging. */
static void log_init(void)
{
    ret_code_t rc = NRF_LOG_INIT(NULL);
    APP_ERROR_CHECK(rc);
    NRF_LOG_DEFAULT_BACKENDS_INIT();
}

int main(void)
{
    ret_code_t rc;

    /* Configure LED-pins as outputs. */
    bsp_board_init(BSP_INIT_LEDS);

    /* Init systick driver */
    nrf_drv_systick_init();

    log_init();

    while (true)
    {
        for (int i = 2; i < 4; i++)
        {
            bsp_board_led_invert(i);
            nrf_drv_systick_delay_ms(500);
            NRF_LOG_RAW_INFO("test");
            NRF_LOG_FLUSH();
        }
    }
}

I've also modified some parameters in sdk_config in comparison to sdk_config.h from the example:

#define NRF_LOG_BACKEND_RTT_ENABLED 0 
#define NRF_LOG_BACKEND_UART_ENABLED 1 
#define NRF_LOG_DEFERRED 0 
#define NRF_LOG_ALLOW_OVERFLOW 0 
#define SEGGER_RTT_CONFIG_DEFAULT_MODE 2 
#define NRFX_SYSTICK_ENABLED 1

I'm using CMake in my project. 

Parents Reply Children
No Data
Related