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

UART issue after BOOTLOADER JUMP

we wrote a small application to jump to a desired address of our application from bootloader , but UART does not seem to work(i cannot see any transmitted values on terminal) once the application is started by the bootloader ,

is it something to do with transferring the vector table from bootloader to main application?

Parents
  • Make sure that you, uninitialize the UART peripheral using app_uart_close() before you call nrf_bootloader_app_start, see below, which will enable the SoftDevice and forward interrupts to the application.

    void nrf_bootloader_app_start(uint32_t start_addr)
    {
        NRF_LOG_INFO("Running nrf_bootloader_app_start with address: 0x%08x\r\n", start_addr);
    
    #if defined(BLE_STACK_SUPPORT_REQD))
        uint32_t err_code;
    
        //NRF_LOG_INFO("Initializing SD in mbr\r\n");
        err_code = nrf_dfu_mbr_init_sd();
        if(err_code != NRF_SUCCESS)
        {
            NRF_LOG_INFO("Failed running nrf_dfu_mbr_init_sd\r\n");
            return;
        }
    
    #endif
    
        // Disable interrupts
        NRF_LOG_INFO("Disabling interrupts\r\n");
    
        NVIC->ICER[0]=0xFFFFFFFF;
    #if defined(__NRF_NVIC_ISER_COUNT) && __NRF_NVIC_ISER_COUNT == 2
        NVIC->ICER[1]=0xFFFFFFFF;
    #endif
    
    #if defined(BLE_STACK_SUPPORT_REQD))
        // Set the sd softdevice vector table base address
        NRF_LOG_INFO("Setting SD vector table base: 0x%08x\r\n", start_addr);
        err_code = sd_softdevice_vector_table_base_set(start_addr);
        if(err_code != NRF_SUCCESS)
        {
            NRF_LOG_INFO("Failed running sd_softdevice_vector_table_base_set\r\n");
            return;
        }
    #endif
    
        // Run application
        nrf_bootloader_app_start_impl(start_addr);
    }
    
Reply Children
No Data
Related