npm1300 NTC battery high temperature

Hi, we are using NPM1300 with a ICP401835TPRT renata battery. It has a 10k B=3380 NTC  (part number NCP15XH103F03RC). I'm getting a really high temperature reads and very constants.....and I don't know the reason.

This is the configuration that we are using in the npm regarding the  NTC:

    // NTC
    { ADCNTCRSEL,      ADC_ADCNTCRSEL_ADCNTCRSEL_10K },                 // Battery has a 10kOhm NTC
    { BCHGDISABLECLR,  BCHGDISABLESET_IGNORE_NTC},                      // Use NTC
    { ADCAUTOTIMCONF,  ADC_ADCAUTOTIMCONF_MAX_TIME_TEMP },              // NTC meas each 1024 ms and interal temp each 32 ms
    { TASKAUTOTIMUPDATE,ADC_TASKAUTOTIMUPDATE_UPDATEAUTOTIM},           // Auto update NTC and DIE temp measurements

And to decode the ADC reads from registers ADCNTCRESULTMSB and ADCGP0RESULTLSBS we are joining the corresponding 10 bits and then using the function from your code:

static int32_t npm1300_code_to_bat_temp(uint16_t code)
{
    int32_t result = 0;
    float log_result = npmx_common_ln_get(((float)NPM_ADC_BITS_RESOLUTION / (float)code) - 1);
    float inv_temp_k = (1.f / 298.15f) - (log_result / (float)npm1300.ntc_beta);
    float temp       = (1.f / inv_temp_k) - 273.15f;
    temp  *= 1000.0f;
    result = (int32_t)temp;

    return result;
}

I have confirmed that this function is working fine because it decodes properly other registers like NTCCOLD + NTCCOLDLSB, or NTCHOT + NTCHOTLSB.

One NTC reading that I have, for instance:

ADCNTCRESULTMSB = 55 =  00110111
ADCGP0RESULTLSBS = 28 = 00011100

That leads to a NTC read of 00110111 11  -> 223 in decimal. (62ºC once transformed into Celsius)

Any advice? any configuration to review?

Thanks in advance

Related