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.

ADS1299: DRDY not always triggering

Part Number: ADS1299

I 've got an ADS1299 device and trying it with my MCU via SPI interface. The DRDY pin is used to trigger ISR on the MCU. 

To let the MCU manage ADS device via SPI interface, we statically provisioned the PWDN, RESET, START, CLKSEL DAISY pins. The major interface between MCU is the SPI interface and the DRDY interrupt line. The ADS powers on at the same time as the MCU using 5V single polar mode, there is no interaction between the MCU and ADS before the MCU is fully ready (which needs at least 1sec). The use of the ADS is started by an user interaction with MCU and it will be stopped by another interaction. 

So my use of the ADS device will start 1+sec after its power on and each use has follows three major stages:

  • setup stage. Here the MCU sends RESET for first use (and WAKEUP for repetitive uses), waits for 1ms, then sends SDATAC, then does WREG to setup rates and channels, it then does RREG to dump all registers and then sends START to start conversion, finally it sends RDATAC;
  • data reading stage. Here the MCU simply waits for DRDY signal and then reads 216bits via SPI;
  • tear down stage. Here the MCU send SDATAC command and then STANDBY command. 

My MCU will repeat the above use steps.

My question is that sometimes the above process works as expected but sometimes the DRDY triggering seems not happening or happens only once per use. In both cases, the RREG returns reasonable registers values like

3e 96 c0 60 00 61 61 61 61 61 61 61 61 00 00 00 00 00 00 00 cf 00 00 00

. My device statically selects PWDN, RESET and CLSEL pins so that the MCU can use SPI commands to control ADS. When the device works, I can do many use loops without issue (e.g. keep using for 10min or 1hour), however, it may not work after next power on. Once it fails to work, I can hardly make it work by simply repeat power-off-on cycle --- but during the practices, I found that by short cut the 3V3-GND and 5V-GNG pins during power off, I will have a larger chance to get it back to working state.  

Hope I can get some hints here.

Regards,

yf

 

 

  • Hi yf liu,

    Welcome to our e2e forum! Can you grab screen shots from an oscilloscope of your interface timing? Usually when there are DRDY problems with the ADS1299 it is because not all data was read out from the device before DRDY becomes active again. What is the data rate seting for the ADS1299 and how fast is your SPI clock?
  • Tom,

    Thank you for promptly response. My ADS data rate is 250 (also shown in the CONFIG1 value 0x96h) and my SPI clock is 1Mhz and I read 216 bits each time after getting an ISR.

    Unfortunately I don't have a logic analyzer at hand, will find one to get more details later. 

    Regards,

    yf

  • Tom,

    Thanks for the prompt response. :)

    The SPI clock is 1Mhz and conversion rate is 250sps (also shown by CONFIG1=0x96h). I read 216-bits each time after getting DRDY and average read time is than 1ms. I am unsure if my DRDY issue is related to data read out since once the device is working, it can be used for more than 12+ hours for many setup-use-teardown loops.... if my usage is wrong, it should happen in that case as well.

    Actually I am having confusions about how the device works. For example:

    - In RDATAC mode, will slow SPI read affect the device's internal data conversion? My guess is that conversion is independent of SPI operations thus slow readers may not get all the samples but it should not affect DRDY signal. The DRDY should trigger at constant speed no matter the speed of SPI reader.
    - Change between RDATAC and SINGLE_SHOT modes --- section 9.4.5 and 9.4.6 have words mentioning that using STOP-START commands one can change between RDATAC and SINGLE_SHOT mode, is this true? How can I avoid this mode changing? I think from design perspective, explicit mode changing is much simpler and clear. But in case it is true, I've purposely not using any STOP command during my tear-down stage so that next START won't change the mode accidentally.
    - Will RESET cmd work when it is in STANDBY or RDATAC mode? Will WAKEUP command hurt if device is in RDATAC mode? It will be very nice if an UML state chart describing the device's behavior can be added to the data sheet so that MCU developer can learn the dynamical behaviors clearly and follow it correctly.

    As for oscilloscope shots, sadly I don't have a logic analyzer at hand. I will see if I can find one and share later.

    Regards,
    yf
  • Hi yf,

    I will do my best to address your questions. If you need additional clarification do not hesitate to ask!

    1) In RDATAC mode, a slow SPI read will not affect internal conversion. If the SPI read is slow then data will become corrupted.
    2) From sections 9.4.6 & 9.5.3.7: "Single-shot mode is enabled by setting the SINGLE_SHOT bit in the CONFIG4 register to '1'. When switching from Continuous Conversion mode to Single-Shot mode, bring the START signal low and back high or send a STOP command followed by a START command. RDATAC mode is cancelled by the Stop Read Data Continuous command." I do not believe that sending the STOP-START commands will alter the registers to change data retrieval to single shot mode.
    3) Commands are stand alone and I do not see a problem with issuing a RESET or WAKEUP command in RDATAC mode.
  • The issue has been resolved somehow after I can robustly using command to control the device. Now I can get steady DRDY interrupts.

    This can be closed since my original issue might be related to the fact that the device was not in the expected state.