Hello everyone,
My project consists on using the nPM1300 with ESP32-S3 on a custom board. I2C connection is pretty much validated, since I have already configured some features such as: button debounce for SHIP mode, entering SHIP mode, reading SHPHLD status, current limit on VBUS at start up, etc.
I tried almost every possible way to get a simple ADC reading, but the results are always zero no matter what I try measuring. I checked the hardware and VBAT, VBUS and VSYS voltages are certainly there.
Some examples of what I tried so far:
1 - cleared EVENTSADCCLR register completely --> triggered TASKVSYSMEASURE --> waited for EVENTSADCSET (ID = D) to trigger on its own --> read ADCVSYSRESULTMSB, and ADCGP0RESULTLSBS (considering only ID = D value); both of them always return zero.
2 - cleared EVENTSADCCLR register completely --> triggered TASKVBUS7MEASURE --> waited for EVENTSADCSET (ID = H) to trigger on its own --> read ADCVBAT3RESULTMSB, and ADCGP1RESULTLSBS (considering only ID = D value); both of them always return zero.
3 - cleared EVENTSADCCLR register completely --> configured ADCCONFIG to single measurement when triggered, single measurement (by writing 0x00 to this register) --> triggered TASKVBATMEASURE --> waited for EVENTSADCSET (ID = A) to trigger on its own --> read ADCVBATRESULTMSB, and ADCGP0RESULTLSBS (considering only ID = A value); both of them always return zero.
4 - cleared EVENTSADCCLR register completely --> configured ADCCONFIG to measure VBAT every 1s, single measurement (by writing 0x01 to this register) --> waited for EVENTSADCSET (ID = A) to trigger on its own --> read ADCVBATRESULTMSB and ADCGP0RESULTLSBS (considering only ID = A value); both of them always return zero.
All of these steps were tested in both an infinite loop, and as a single execution throughout the application's code.
Does anyone have any clue of why the ADC never returns an actual reading? I would appreciate any tip or insight you can give.
Best regards,
Lucas