solved NULL pointer dereference in gpio_irq_isr, when SPI not yet initialized