This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LDC1101EVM: Unable to set DRDY bit after shutdown mode

Part Number: LDC1101EVM
Other Parts Discussed in Thread: LDC1101

Hiiyaa Forum Experts,

I successfully implemented all the functions in LDC1101. But when I put my sensor in Shutdown mode after some delay I put my sensor in sleep mode then I initialize all the required registers for Rp+L register then I put my sensor in active mode for data scanning. Then I see DRDY bit is 1 it is not setting to 0. WHat can be issue I gave whole day but unable to Copup from that issue. please throw some light on me

  • Hello Manish, 

    If the DRDY bit is always at 1, it could be an issue with the data from your sensor, an issue with the registers, or it is getting set to 1 quickly after the conversion happens. Can you send me a config file of your registers so that I could try to recreate your issue? In the meantime, you could also double check the sensor is operating correctly.

  • Hi Justin,

    Here are my register configurations for Rp+L mode, you can have a look into that:

      SPI_Master_WriteReg(0x01, 0x45);
      SPI_Master_ReadReg(RP_SET);
      Status_reg = ReceiveBuffer;
      SPI_Master_WriteReg(0x02, 0xDE);
      SPI_Master_ReadReg(TC1);
      SPI_Master_WriteReg(0x03, 0xFD);
      SPI_Master_ReadReg(TC2);
      SPI_Master_WriteReg(0x04, 0xF7);
      SPI_Master_ReadReg(DIG_CONFIG);

    but in main function I'm approaching in the following way.

    I'm running a hardware timer for every 250ms if for the first time 250ms is elapsed then I'm putting the sensor in shutdown mode and for the second time if the 250ms is elapsed I'm switching it back to active mode and then I'm performing my conversion operation. I'll attach my logic here so that, it will be better to understand. Please check this out also.

          if(timer_flag == 1)                           // for the first time timer is elapsed
          {
            //put sensor in sleep mode
            SPI_Master_WriteReg(0x0B, _LDC1101_FUNC_MODE_SLEEP_MODE);      // after sleep mode put sensor in shutdown mode
            LDC_ShutDown_Mode();
          }
          else if(timer_flag == 2)                   // for the second time timer is elapsed.
          {
            SPI_Master_WriteReg(0x0B, _LDC1101_FUNC_MODE_SLEEP_MODE);
            __delay_cycles(1000);                            // creating a software delay to run cpu for 1000 cycles
            Retain_Register_Config();                      // intializng the registers again with above value
            SPI_Master_WriteReg(0x0B, _LDC1101_FUNC_MODE_ACTIVE_CONVERSION_MODE);
            __delay_cycles(1000);
            SPI_Master_ReadReg(STATUS);          // STATUS register is checked here for DATA bit i.e DRDY bit is set or clear
            Status_reg = ReceiveBuffer;
            P3IE |= BIT0;                                          // Port interrupt for INTB function register
          }
        

    Please have a look on comments also so that it will be easier for you to understand what I'm doing and why? Hope to get reply soon by your side.

    [Edited] Can you tell how much amount of time is required for initializing the 5 regeisters RP_SET, TC1, TC2, DIG_CONF and START_CONF registers because I'm a complete rookie or a nood for meaddsuring such stuffs.

  • Hi Justin,

    Please check my register configuration and let me know whether it is correct or not? And I have solved that issue for which I posted query on this forum. Please check my configuration [art and let me know then please feel free to close this thread.

  • Hello Manish, 

    For the register write time, it will depend on your serial clock frequency. To make sure you have the right timing for your application, please check out the timing section in the datasheet (section 7.7) as well as the SPI programming section (8.5.1). 

    As for your register configuration, everything looks good. As long as you are also properly writing the ALT_CONFIG register for shutdown. 

    Best regards, 

  • Hi Justin,

    Thanks for your help and support. Please move forward to close this thread.