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

TWI master and slave on the same port

Hi

I am using the nRF52840 with an external sensor which I need to config (nRF is the master). after this, nRF is acting like a I2C slave (twis) and i like to trigger an interrupt as soon as the sensor is sending some data (sensor = master, nRF = slave) To read out values from the sensor, nRF will change to master, sensor to slave.

nRF is always the master or the slave, not both at the same time of course.

Master communication is running, but as soon as I enabled the twis in the SDK config, I got the Error of an already defined IRQ:

multiple definition of `SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler;

what I found in the DevZone is that nRF is using the same IDs and it would be possible to solve this with the function

nrfx_err_t nrfx_prs_acquire(void       const * p_base_addr,
                            nrfx_irq_handler_t irq_handler);

Is tis correct? How do I have to implement this function to solve the Error?

Do you have an example which shows how should this be implemented?

Thanks a lot

Parents Reply Children
No Data
Related