Hello
I'm getting the error below. I get this Error When I add TWI code into my code.
Hello
I'm getting the error below. I get this Error When I add TWI code into my code.
Hi,
The SPIM0, SPIS0, TWIM0, TWIS0, SPI0 and TWI0 peripherals share the same HW resources (including IRQ number), so only one can be enabled at a time. I suspect the reason for the linker error is that you are using moret of those peripherals (or at least have enabled more than one in your projects sdk_config.h). Make sure you only use one. If you need to use e.g. both SPIM and TWIM, make sure they use different HW resources (ID), which you can check here if you are using nRF52832.
Hi,
SPIM and TWIM are shared resources, meaning that you cannot have the same index of each running at the same time.
In sdk_config.h, you should have a TWI0_ENABLED set to '1'. Try setting this to '0' and enabling TWI1_ENABLED instead.
Best regards,
Håkon
Hello,
I need to use 2x SPI Bus in master mode and 1x TWI Bus in master mode.
How do I need to configure ?
You can configure to use TWIM0, SPIM1, and SPIM2 in your sdk_config.h.
In your sources, you can set them like this:
static const nrf_drv_twi_t m_twi_master = NRF_DRV_TWI_INSTANCE(0);
static const nrf_drv_spi_t m_spi1 = NRF_DRV_SPI_INSTANCE(1);
static const nrf_drv_spi_t m_spi2 = NRF_DRV_SPI_INSTANCE(2);
Best regards,
Håkon