Hi everyone,
first time posting here for me, let me know if i'm doing it wrong.
I'm currently developing a "modem module" built around nrf9160 and working with AWS using NBIoT. The module will be added to a device which will communicate with it through I2C. The nrf9160 will be the slave device on the bus and will receive data to publish on AWS using MQTT.
I tested the"aws IoT" example and it's working correctly.
I build a sample code to receive the data on I2C using TWIS library since Zephyr doesn't support Slave I2C with its drivers. This code is working fine and i'm able to receive the data into a buffer and work on them. Here the interesting part of the code i used for the I2C slave:
Here the prj.conf sed to test the i2c:
Here the overlay used to test the I2C:
Here the actual code used to test the i2c:
This code works perfectly.
The problem arises when I try to add the i2c part to the aws IoT example. Just by inserting the same code and performing the same initialization, the system is not able to enter the twis_event_handler function nor the system is providing ACK on the I2C bus.
I checked the return value of the nrfx_twis_init function and i'm getting NRFX_SUCCESS so the peripheral should be initalized correctly
Here is the prj.conf of the complete code (mainly the same as for aws IoT example with I2C and some APN configuration added):
The overlay file is the same as before.
Am I missing some configuration that has to be done? Are there any conflicts between peripherals that are blocking the I2C?
Thank you in advance for any help
Nicolò