Post Go back to editing

CN0510 board and the data results generated using Analog Devices SensorPal software do not match the results generated by the software on github.

Category: Software

XLSX

I am using a CN0510 board and the data results generated using Analog Devices SensorPal software do not match the results generated by the software on github.
No boards were moved during this process, please help with this, thanks!

I printed the values of the registers, are these register values correct?

Hello AD5940-Build Time:10:00:22

This AD594x!

Note: Current Silicon is S2

AD5940LIB Version:v0.2.1

REG_AFE_SWMUX: 0x0 ,REG_AFE_ADCCON: 0x10607

REG_AFE_SEQCON: 0x1 ,REG_AFE_FIFOCON: 0x4800 ,REG_AFE_SEQCRC: 0x1 ,REG_AFE_SEQCNT: 0x0 ,REG_AFE_SEQTIMEOUT: 0x0 ,REG_AFE_DATAFIFORD: 0x1203dae ,REG_AFE_SEQSLPLOCK: 0xa47e5 ,REG_AFE_SEQTRGSLP: 0x0 ,REG_AFE_SEQ0INFO: 0x60023 ,REG_AFE_CMDFIFOWADDR: 0x27 ,REG_AFE_CMDDATACON: 0x489 ,REG_AFE_DATAFIFOTHRES: 0x20000 ,REG_AFE_SEQ3INFO: 0x0 ,REG_AFE_SEQ1INFO: 0x230000 ,REG_AFE_FIFOCNTSTA: 0x3fe0000 ,REG_AFE_SYNCEXTDEVICE: 0x4 ,REG_AFECON_TRIGSEQ: 0x0

AD5940Err AppBATMeasureRCAL(void)
{
	uint32_t buff[100];
	uint32_t temp;
	AD5940_INTCCfg(AFEINTC_0, AFEINTSRC_DATAFIFOTHRESH, bFALSE); /* Disable INT0 interrupt for RCAL measurement. */
	AppBATCfg.state = STATE_RCAL;
	 printf("REG_AFE_SWMUX: 0x%x ,", AD5940_ReadReg(REG_AFE_SWMUX));
    printf("REG_AFE_ADCCON: 0x%x \n", AD5940_ReadReg(REG_AFE_ADCCON));
    printf("REG_AFE_SEQCON: 0x%x ,", AD5940_ReadReg(REG_AFE_SEQCON));
    printf("REG_AFE_FIFOCON: 0x%x ,", AD5940_ReadReg(REG_AFE_FIFOCON));
    printf("REG_AFE_SEQCRC: 0x%x ,", AD5940_ReadReg(REG_AFE_SEQCRC));
    printf("REG_AFE_SEQCNT: 0x%x ,", AD5940_ReadReg(REG_AFE_SEQCNT));
    printf("REG_AFE_SEQTIMEOUT: 0x%x ,", AD5940_ReadReg(REG_AFE_SEQTIMEOUT));
    printf("REG_AFE_DATAFIFORD: 0x%x ,", AD5940_ReadReg(REG_AFE_DATAFIFORD));
    printf("REG_AFE_SEQSLPLOCK: 0x%x ,", AD5940_ReadReg(REG_AFE_SEQSLPLOCK));
    printf("REG_AFE_SEQTRGSLP: 0x%x ,", AD5940_ReadReg(REG_AFE_SEQTRGSLP));
    printf("REG_AFE_SEQ0INFO: 0x%x ,", AD5940_ReadReg(REG_AFE_SEQ0INFO));
    printf("REG_AFE_CMDFIFOWADDR: 0x%x ,", AD5940_ReadReg(REG_AFE_CMDFIFOWADDR));
    printf("REG_AFE_CMDDATACON: 0x%x ,", AD5940_ReadReg(REG_AFE_CMDDATACON));
    printf("REG_AFE_DATAFIFOTHRES: 0x%x ,", AD5940_ReadReg(REG_AFE_DATAFIFOTHRES));
    printf("REG_AFE_SEQ3INFO: 0x%x ,", AD5940_ReadReg(REG_AFE_SEQ3INFO));
    printf("REG_AFE_SEQ1INFO: 0x%x ,", AD5940_ReadReg(REG_AFE_SEQ1INFO));
    printf("REG_AFE_FIFOCNTSTA: 0x%x ,", AD5940_ReadReg(REG_AFE_FIFOCNTSTA));
    printf("REG_AFE_SYNCEXTDEVICE: 0x%x ,", AD5940_ReadReg(REG_AFE_SYNCEXTDEVICE));
    printf("REG_AFECON_TRIGSEQ: 0x%x \n,", AD5940_ReadReg(REG_AFECON_TRIGSEQ));
	if(AppBATCfg.SweepCfg.SweepEn)
	{
		uint32_t i;
    for(i=0;i<AppBATCfg.SweepCfg.SweepPoints;i++)
    {
      AD5940_SEQMmrTrig(SEQID_0);
			while(AD5940_INTCTestFlag(AFEINTC_1, AFEINTSRC_DATAFIFOTHRESH) == bFALSE);
			printf("i: %d   Freq: %.2f ",AppBATCfg.SweepCfg.SweepIndex, AppBATCfg.SweepCurrFreq);
			AppBATISR(buff, &temp);
			AppBATCfg.RcalVoltTable[i][0] = AppBATCfg.RcalVolt.Real;
			AppBATCfg.RcalVoltTable[i][1] = AppBATCfg.RcalVolt.Image;
			printf(" RcalVolt:(%f,%f)\n",  AppBATCfg.RcalVoltTable[i][0], AppBATCfg.RcalVoltTable[i][1]);
			AD5940_Delay10us(10000);
    }
		AppBATCfg.RcalVolt.Real = AppBATCfg.RcalVoltTable[0][0];
		AppBATCfg.RcalVolt.Image = AppBATCfg.RcalVoltTable[0][1];
	}else
	{
		AD5940_SEQMmrTrig(SEQID_0);
		while(AD5940_INTCTestFlag(AFEINTC_1, AFEINTSRC_DATAFIFOTHRESH) == bFALSE);
		AppBATISR(buff, &temp);
	}
	AD5940_INTCCfg(AFEINTC_0, AFEINTSRC_DATAFIFOTHRESH, bTRUE);
	return 0;
}

I have uploaded the data.



Increased register values
[edited by: menglinwang at 11:04 AM (GMT -5) on 31 Jan 2024]
Parents Reply
  • Sure, attached is a measurement that I did in Sensorpal and exported it to Excel since Sensorpal will connect the measured points with a line.

    Parameters are the following:

    Start Freq.: 1 Hz
    Stop Freq.: 5k Hz
    Sweep & Logarithmic both enabled
    DC Bias: 1200 mVpp
    AC Amplitude: 400 mVpp

    EDIT: The battery is a 3S LiPo

Children