Post Go back to editing

AD5940

Thread Summary

The user wants to change the AD5940's sampling frequency to 1000Hz. The final answer indicates that the ADC configuration must be adjusted to set the derived waitclks to 16MHz/1000Hz. The user should monitor the output of AD5940_ClksCalculate() and modify the configuration accordingly.
AI Generated Content
Category: Software
Product Number: ad5940
Software Version: keil

I want to set the sampling frequency to 1000hz n the BIA code,I modified this section(set the BiaODR to 1000),But the sampling rate does not change.

If you want to change the sampling frequency to 1000Hz, where do you need to change it?

Thanks.

Parents Reply
  • Hi,

    In the function below, 

    static AD5940Err AppBIASeqMeasureGen(void)
    {
    AD5940Err error = AD5940ERR_OK;
    uint32_t const *pSeqCmd;
    uint32_t SeqLen;

    uint32_t WaitClks;
    SWMatrixCfg_Type sw_cfg;
    ClksCalInfo_Type clks_cal;

    clks_cal.DataType = DATATYPE_DFT;
    clks_cal.DftSrc = AppBIACfg.DftSrc;
    clks_cal.DataCount = 1L<<(AppBIACfg.DftNum+2); /* 2^(DFTNUMBER+2) */
    clks_cal.ADCSinc2Osr = AppBIACfg.ADCSinc2Osr;
    clks_cal.ADCSinc3Osr = AppBIACfg.ADCSinc3Osr;
    clks_cal.ADCAvgNum = 0;
    clks_cal.RatioSys2AdcClk = AppBIACfg.SysClkFreq/AppBIACfg.AdcClkFreq;
    AD5940_ClksCalculate(&clks_cal, &WaitClks);

    ................

    AD5940_ClksCalculate() function calculates the number of clocks required to wait for each sample output.

    For ODR =1000Hz, no. of wait clocks allowed between each sample is (16MHz/1000Hz) if system clock frequency = 16Mhz.

    Kindly monitor AD5940_ClksCalculate() output and change the config to achieve (16MHz/1000Hz).

Children