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

NRF_ERROR_SVC_HANDLER_MISSING on SPI master open

I get NRF_ERROR_SVC_HANDLER_MISSING error in spi_open function.

uint32_t err = sd_nvic_ClearPendingIRQ(p_spi_instance->irq_type);
APP_ERROR_CHECK(err);

I'm using dfu_dual_bank_ble_s110_pca10028 project for my bootloader project. I understand that SD must be initialized before SPI initialization, but I don't need SD in this moment since I will flash the SD with my functions and not MBR. This bootloader uses SPI external flash to read data which must be flashed, since SD is one of the thing I must update, it should not be initiated.

Any way to initialize SPI in this example without enabling the SD?

Thank you!

Br, Mladen

Parents Reply
  • static void spi_init(void) { uint32_t err_code = NRF_SUCCESS;

    		// Configure SPI master
        spi_master_config_t spi_config = SPI_MASTER_INIT_DEFAULT;
    		spi_config.SPI_Pin_SCK  = SPI0_SCK_PIN;
        spi_config.SPI_Pin_MISO = SPI0_MISO_PIN;
        spi_config.SPI_Pin_MOSI = SPI0_MOSI_PIN;
        spi_config.SPI_Pin_SS   = SPI0_SS_PIN;
    		spi_config.SPI_CONFIG_ORDER = SPI_CONFIG_ORDER_MsbFirst;
    	
    		err_code = spi_master_open(SPI_MASTER_0, &spi_config);
    		APP_ERROR_CHECK(err_code);
    	
    		// Register event handler for SPI master
        spi_master_evt_handler_reg(SPI_MASTER_0, spi_master_0_event_handler);
    }
    
Children
No Data
Related