Hi,
I’m trying to enable access to a STM32 as a I2C slave, I have this working in a isolated project but when I try a pulling it into our main project and enable CONFIG_I2C=y
in the prj.conf
I am getting the error
gen_isr_tables.py: error: multiple registrations at table_index 9 for irq 9 (0x9)
Existing handler 0x2c837, new handler 0x2c837
Has IRQ_CONNECT or IRQ_DIRECT_CONNECT accidentally been invoked on the same irq multiple times?
I can get the two projects working in isolation getting GNSS fix and data + LTE comms and posting data to API in one project and reading writing data to I2C slave in the other
When pulling in the slave project all I did was add
&i2c1 {
stm32slave: stm32@2A {
compatible = "st,stm32-slave";
reg = <0x2A>; // I2C address of the STM32 device
label = "STM32_AUDIO_WING";
};
};
to the circuitdojo_feather_nrf9160_ns.overlay and CONFIG_I2C=y
to the prj.conf
plus the code for reading and writing to the slave
I see zephyr.dts
has
...
uart1: uart@9000 {
compatible = "nordic,nrf-uarte";
reg = < 0x9000 0x1000 >;
interrupts = < 0x9 0x1 >;
status = "disabled";
current-speed = < 0x1c200 >;
pinctrl-0 = < &uart1_default >;
pinctrl-1 = < &uart1_sleep >;
pinctrl-names = "default", "sleep";
};
...
i2c1: i2c@9000 {
compatible = "nordic,nrf-twim";
#address-cells = < 0x1 >;
#size-cells = < 0x0 >;
reg = < 0x9000 0x1000 >;
clock-frequency = < 0x186a0 >;
interrupts = < 0x9 0x1 >;
status = "okay";
pinctrl-0 = < &i2c1_default >;
pinctrl-1 = < &i2c1_sleep >;
pinctrl-names = "default", "sleep";
pcf85063a@51 {
compatible = "nxp,pcf85063a";
reg = < 0x51 >;
};
lis2dh: lis2dh@18 {
compatible = "st,lis2dh";
reg = < 0x18 >;
irq-gpios = < &gpio0 0x1d 0x0 >;
disconnect-sdo-sa0-pull-up;
};
stm32slave: stm32@2A {
compatible = "st,stm32-slave";
reg = < 0x2a >;
label = "STM32_AUDIO_WING";
};
};
...
spi1: spi@9000 {
compatible = "nordic,nrf-spim";
#address-cells = < 0x1 >;
#size-cells = < 0x0 >;
reg = < 0x9000 0x1000 >;
interrupts = < 0x9 0x1 >;
max-frequency = < 0x7a1200 >;
easydma-maxcnt-bits = < 0xd >;
status = "disabled";
};
...
but spi1 and uart1 are disabled
so that shouldn’t be it
here is the prj.conf for reference just in case there is a conflict I don’t know about.
# General
CONFIG_FPU=y
# CONFIG_UART=n
CONFIG_NRF_MODEM_LIB=y
CONFIG_STDOUT_CONSOLE=y
# CONFIG_UART_INTERRUPT_DRIVEN=n
CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
# Networking
CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_POSIX_NAMES=y
CONFIG_NET_NATIVE=n
# Enable I2C
CONFIG_I2C=y
# Memory and stack configuration
CONFIG_HEAP_MEM_POOL_SIZE=2048
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536
# GPS Antenna configuration
CONFIG_MODEM_ANTENNA=y
CONFIG_MODEM_ANTENNA_AT_COEX0="AT%XCOEX0=1,1,1565,1586"
# PDN library
CONFIG_PDN=y
CONFIG_PDN_ESM_STRERROR=y
# LTE Link Control
CONFIG_MODEM_KEY_MGMT=y
CONFIG_LTE_LINK_CONTROL=y
CONFIG_LTE_NETWORK_MODE_LTE_M_GPS=y
# Request eDRX from the network
CONFIG_LTE_EDRX_REQ=y
CONFIG_LTE_PSM_REQ=y
# PSM requested periodic TAU 6 hours and 40 minutes (400 minutes)
CONFIG_LTE_PSM_REQ_RPTAU="00101000"
# PSM requested active time 6 seconds
CONFIG_LTE_PSM_REQ_RAT="00000011"
# IPV4 only thanks Telstra
CONFIG_PDN_DEFAULTS_OVERRIDE=y
CONFIG_PDN_DEFAULT_FAM_IPV4=y
CONFIG_TFM_KEY_FILE_S="C:/ncs/v2.4.1/modules/tee/tf-m/trusted-firmware-m/bl2/ext/mcuboot/root-RSA-3072.pem"
CONFIG_TFM_KEY_FILE_NS="C:/ncs/v2.4.1/modules/tee/tf-m/trusted-firmware-m/bl2/ext/mcuboot/root-RSA-3072_1.pem"
CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_NEWLIB_LIBC_MIN_REQUIRED_HEAP_SIZE=2048
CONFIG_DEBUG_THREAD_INFO=y
CONFIG_DEBUG_OPTIMIZATIONS=y
CONFIG_MODEM=y
CONFIG_MODEM_INFO=y
CONFIG_HTTP_PARSER_URL=y
CONFIG_HTTP_CLIENT=y
# Logging
CONFIG_LOG=y
CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_LOG_BACKEND_UART=n
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LTE_LINK_CONTROL_LOG_LEVEL_DBG=n
CONFIG_NET_LOG=y
CONFIG_NET_PKT_LOG_LEVEL_DBG=n
CONFIG_NET_HTTP_LOG_LEVEL_DBG=y
CONFIG_NRF_MODEM_LIB_LOG_LEVEL_DBG=y
# Date Time library
CONFIG_DATE_TIME=y
# Power management
CONFIG_PM_DEVICE=y
# Settings
CONFIG_SETTINGS=y
CONFIG_SETTINGS_RUNTIME=y
# Nordic trace
CONFIG_NRF_MODEM_LIB_TRACE=y
CONFIG_AT_HOST_LIBRARY=y #(note this is optional)
```
Has anyone encountered a similar issue before or can provide some guidance on how to resolve this? I appreciate any help!
Thanks in advance.