I2C communication causing the board to reset

Hi,

I am trying to communicate with nPM1300 PMIC board using NRF5340DK. I have made the connections and set up the overlay file as recommended. The I2C write (i2c_write_dt() ) works fine  in the sense that I am able to set up different LEDs, bucks and LDOs as I want to, and also able to turn them off or set them to desired voltages. Along with this, I also want to be able to read registers for errors and such. But when I use i2c_write_read_dt command, it causes the device to reset. I have also tried probing it via oscilloscope and I observe that I receive the value in the register as well as expected and a NACK to terminate the read function. But the debugger never enters the next line of code and immediately causes the board to reset. I have also tried using  mfd_npm1300_read_reg() function and the result is the same. Additionally, I have also tried using i2c_write_dt separately to send the register address initially and then use i2c_read_dt and also tried giving longer delay between write and read, but the end result is the same. Could I please get some help regarding this and how to solve this issue?

Toolchain version - 2.5.2

SDK version - 2.5.2, VS Code

Thanks,

Tejaswi

Related