Please include the following information, in order for us to help you as effectively as possible.
Core: RAK4631
Base: RAK19010
Firmware: Zephyr (4.1.99)
nRF Connect SDK v3.1.1
I have an issue where nothing is responding on the I2C0 bus. Simple bus scanner logic is returning zero active modules. This smells like a Zephyr devicetree config issue or a missing config setting in prj.config.
GPIO (led0/led1) is working. Nothing on the i2c bus. device_is_ready(i2c_dev) is returning non-zero so zephyr thinks the bus is there. However, nothing responds when doing a scan.
Is there a community/official overlay file for the RAK4631/RAK19010 combination? Is the rak4631_nrf52840.dts sufficient with individual overlays for each sensor I am composing onto the base board?
TLDR: Enable power pin on slot where RAK12047 is installed or havoc ensues on I2C bus.
So after a lot of removal of modules, swapping modules between slots etc, I resolved most of my issues.
I removed all modules except RAK12002 (RTC) and the I2C bus behaved normally. I tried the module in Slot A and got the config and basic functions to work including I2C scan.
swapped the RAK12002 to Slot C and RTC worked as expected, including I2C scan.
added RAK12501 to board and could not get the device to respond on uart0 or uart1. Removed the RAK12501.
added RAK1906 to board (Slot B), device initialized as expected and I2C scan behaved as expected.
added RAK12047 (Air Quality) to board, no I2C device initialized and I2C scan was extremely slow and no device was found on the bus.
removed the RAK12047 from the board and all devices responded with I2C scan behaving as expected.
removed all other devices from the board and installed RAK12047 into Slot A. I2C scan was extremely slow again and the device would not initialize.
moved the RAK12047 to Slot C and Slot D, same result as Slot A.
finally found that the RAK12047 requires switched power to the slot. Installed the module into Slot A and configured the gpio pin [<&gpio1 2 GPIO_ACTIVE_HIGH>; // P1.02] so I could toggle the power on Slot A.
RAK12047 initialized properly and the I2C scan behaved normally (fast and single module found).
Added back the RAK12002 (RTC) to Slot C and the RAK1906 (temp/humid/+) to Slot B and all three devices initialized correctly and the I2C bus scan was fast and found all three devices.
So, one of the issues was that if the slot where the RAK12047 did not have its power enabled, it caused havoc on the I2C bus, e.g. nothing would communicate on the bus.
My second issue is with the RAK12501. I cannot get the device to respond on any uart. I had the module installed in Slot D which according to the documentation is on UART0 (P0.19/P0.20) but there is clearly something I am missing.
Having this known condition documented in the product documentation or even the sample code would have been helpful. I did use the pin mapper which was of great help that lead me down the path of the missing power enable. Given the power enable pin is slot dependent, it was not immediately obvious.