Hello,
I am having trouble reading an interrupt on an nRF5340. This is on a custom board using the ISP2053 SIP.
We are using the high speed SPI interface on pins P0.08 - P0.11. This is working correctly, however our SPI slave has an interrupt pin which we need to read. This pin is connected to P0.12.
On a development board, the interrupt pin works as normal, however on our custom board we cannot see the interrupt pin toggle. Our layout is correct. Are there any settings or differences when using the ISP2053 SIP?
Here is our SPI code:
&pinctrl { spi_master_default: spi_master_default { group1 { psels = <NRF_PSEL(SPIM_SCK, 0, 8)>, <NRF_PSEL(SPIM_MOSI, 0, 9)>, <NRF_PSEL(SPIM_MISO, 0, 10)>; nordic,drive-mode = <NRF_DRIVE_H0H1>; }; }; }; ah_spi_master: &spi4 { compatible = "nordic,nrf-spim"; status = "okay"; pinctrl-0 = <&spi_master_default>; pinctrl-1 = <&spi_master_sleep>; cs-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; reg_ah_spi_master: spi-dev-a@0 { reg = <0>; }; }; / { interrupts { compatible = "gpio-keys"; spi_data_available: spi_data_available { label = "SPI Data Available"; gpios = <&gpio0 12 (GPIO_ACTIVE_HIGH)>; }; }; };
The GPIO is being configured as shown
static const struct gpio_dt_spec s_dataAvailableGPIO = GPIO_DT_SPEC_GET(DT_NODELABEL(spi_data_available), gpios); static void dataAvailableInterrupt(const struct device *dev, struct gpio_callback *cb, uint32_t pins) { LOG_INF("dataAvailableInterrupt"); } static void configureInterrupt(void) { gpio_pin_configure_dt(&s_dataAvailableGPIO, GPIO_INPUT); gpio_pin_interrupt_configure_dt(&s_dataAvailableGPIO, GPIO_INT_EDGE_TO_ACTIVE); static struct gpio_callback spiIntCB; gpio_init_callback(&spiIntCB, dataAvailableInterrupt, BIT(s_dataAvailableGPIO.pin)); gpio_add_callback(s_dataAvailableGPIO.port, &spiIntCB); }
Thank you