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

SPI when advertising not working

Hi 

I am using SPI to talk to an LIS2DH with an NRF51822. I have merged the SPI Master example with the ble_app_rscs example and as soon as the ble advertising begins, my SPI interrupts no longer work and I end up in the hard fault. I have changed the IRQ priority to high but it still does not work. 

I am using SDK8.0.0 - I know it's old, it's the only SDK version I could get to work with the free version of Keil. 

Parents Reply
  • OK, I understand thank you. 

    Can you how me where to place and how to call the app_scheduler for this situation please? the current interrupt is in spi_master.c: 

    void SPI0_TWI0_IRQHandler(void)
    {
        if ((NRF_SPI0->EVENTS_READY == 1) && (NRF_SPI0->INTENSET & SPI_INTENSET_READY_Msk))
        {
            NRF_SPI0->EVENTS_READY = 0;
    
            volatile spi_master_instance_t * p_spi_instance = spi_master_get_instance(SPI_MASTER_0);
    
            spi_master_send_recv_irq(p_spi_instance);
        }
    }

Children
Related