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

error 0x2001 during spi_master_close()

Hi,

I get 0x2001 error in spi_master_close() at the following 2 lines.

/* Disable interrupt */
APP_ERROR_CHECK(sd_nvic_ClearPendingIRQ(p_spi_instance->irq_type));
APP_ERROR_CHECK(sd_nvic_DisableIRQ(p_spi_instance->irq_type));

spi_master_close() is called just before sd_power_system_off() is called. The spi_master_instance is SPI_MASTER_1.

Any idea why the above error could happen? Is this error benign given that the chip is anyway going to go into system power off mode?

Thanks, Sam

Parents
  • That is an interesting error to be getting. It is a NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE error. Which means the interrupt you are passing to those functions is not one that the application is allowed to use.

    Since the SPI peripheral is not blocked or restricted by the soft device stack it should not occur. I'd check that my p_spi_instance pointer was valid and what is stored in the irq_type field. Is irq_type the value you should be using? (I'm not familiar with the SPI and that particular structure).

Reply
  • That is an interesting error to be getting. It is a NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE error. Which means the interrupt you are passing to those functions is not one that the application is allowed to use.

    Since the SPI peripheral is not blocked or restricted by the soft device stack it should not occur. I'd check that my p_spi_instance pointer was valid and what is stored in the irq_type field. Is irq_type the value you should be using? (I'm not familiar with the SPI and that particular structure).

Children
No Data
Related