Hello everyone,
I am exploring the nPM1300 EK so that I can use it in future projects. My overall goal is to be able to use it with an nRF52 as well as an stm32 host controller. For that I followed the path to the corresponding zephyr drivers from your website (github.com/.../npmx-zephyr). I have downloaded and integrated the drivers successfully into my zephyr dev tools. As a first test I compiled the LED example on an nrf52840dk and it worked completely fine. Adjusting the code for an stm32 MCU was also not a problem and I got it to work as well.
I first ran into problems after I tried to run the Fuel Gauge example on my stm32 MCU. It led to the following runtime error.
*** Booting Zephyr OS build zephyr-v3.3.0 *** [00:00:00.000,000] <inf> main: PMIC device OK. [00:00:00.001,000] <err> fuel_gauge: Reading ADC measurements failed. [00:00:00.001,000] <err> main: Fuel gauge initialization failed.
In order to resolve this issue, I investigated the i2c communication and compared it with a working system using my nrf52840dk. As a result, I noticed, that some sensor initialization happens outside the application code. This initialization is somehow only working on the nrf52840dk and not the stm32. This means, that even if I uncomment the whole code in main.c there is still some communication going on between the nPM1300 and the host controller, which am not able to locate in the code.
I could use any insight about how to find the function responsible for this communication and how I can debug it. It is my current understanding that this happens inside the driver, which must be adjusted in order to work properly on an stm32. Any links, where I can find more detailed driver documentation is also appreciated.
Thanks and kind regards
David