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.

ADS7142: Device does not seem to trigger alert when running in Autonomous Mode with Threshold Monitoring.

Part Number: ADS7142


Hi,

I'm currently working with a ADS7142 and I am trying to get Autonomous Mode with Threshold Monitoring.

I am configuring the device with the following register writes:

ABORT_SEQUENCE 0x01
OPMODE_SEL 0x06
AUTO_SEQ_CHEN 0x03
OSC_SEL 0x01
NCLK_SEL 0x00
DATA_BUFFER_OPMODE 0x06
ALERT_DWC_EN 0x01
ALERT_CHEN 0x03
DWC_HTH_CH0_MSB 0x01
DWC_LTH_CH0_LSB 0x2C
DWC_HTH_CH1_MSB 0x01
DWC_LTH_CH1_LSB 0x2C
DWC_HYS_CH0 0x0A
DWC_HYS_CH1 0x0A
START_SEQUENCE 0x01

After writing a perform a read back to verify that the device has gotten the correct values, and I read the same values as written above. Additionally, I read SEQUENCE_STATUS to verify that auto sequencing is enabled, and the register is set to 0x0A which, if I read the datasheet correctly, corresponds to auto sequencing enabled, no error.

However, when I alter the input voltage above and below the thresholds, the alert pin never triggers. Is there any configuration I have forgotten or misunderstood?

Thank you,

  • Hello,

    Going through your register map:

    the nCLK_SEL is being reset, you are writing 0x00 to the register. if you want a number of cycles less than 18, then you need to write this register to 0x12

    Also, based on the register names you used for your threshold configurations, I would suggest making sure you are configuring the threshold correctly. note there are a total of eight register that correspond to this, and you are only configuring four. I would suggest configuring all eight registers. 

    you currently have 

    Ch0 high threshold MSB- LSB

    0x01 - none

    Ch0 low threshold MSB- LSB

    None- 0x2C

    Ch1 high threshold MSB- LSB

    0x01 - none

    Ch1 low threshold MSB- LSB

    None – 0x2c

    Regards

    Cynthia

  • Hi, thank you for your answer. I'll double check that I've set all 8 threshold registers and change NCLK to 12. I'll get back to you with new results.

  • Hi, sorry for the delay, have been forced to lockdown and have not had access to the hardware.

    I double checked my config and I do write to both MSB and LSB register of the thresholds, I had just missed that in the original post. I did however, change the NCLK to 0x13.

    I am still unable to get the ALERT to trigger. I performed I read back of all registers to verify that they have been written to correctly.

    Is the following config correct for the ADC to run in autonomous mode and generate a ALERT once the thresholds are crossed?

    Register Write Read
    ABORT_SEQUENCE 0x01 0x00
    OPMODE_SEL 0x06 0x06
    AUTO_SEQ_CHEN 0x03 0x03
    OSC_SEL 0x01 0x01
    NCLK_SEL 0x13 0x13
    DATA_BUFFER_OPMODE 0x06 0x06
    ALERT_DWC_EN 0x01 0x01
    ALERT_CHEN 0x03 0x03
    DWC_HTH_CH0_MSB 0x01 0x01
    DWC_HTH_CH0_LSB 0x2C 0x2C
    DWC_HTH_CH1_MSB 0x01 0x01
    DWC_HTH_CH1_LSB 0x2C 0x2C
    DWC_LTH_CH0_MSB 0x00 0x00
    DWC_LTH_CH0_LSB 0x64 0x64
    DWC_LTH_CH1_MSB 0x00 0x00
    DWC_LTH_CH1_LSB 0x64 0x64
    DWC_HYS_CH0 0x0A 0x0A
    DWC_HYS_CH1 0x0A 0x0A
    START_SEQUENCE 0x01    -
    SEQUENCE_STATUS     - 0x0A

    If I understand correctly, with this config, the alert should trigger once the input voltage on CH0 or CH1 crosses, 300 mV or 100 mV +/- the 10 mV hysterisis.

    Is there any particular details that is important when it comes to the HW layout of the chip that might affect the alert generation?

  • Johan,

    When you control the input and cross the threshold, can you check the buffer? You are using post alert, meaning that once either of the thresholds is crossed, the buffer should fill up with 16 samples. Can you confirm that the buffer does not have any data after a threshold is crossed.

    Regards

    Cynthia

  • Hi,

    I've managed to fix the issue. Turns out I did not clear the alert flags and abort the sequence before starting again. This led to the ALERT signal to stay low all the time. After clearing flags, aborting sequence and then starting sequence it works as intended.

    Thank you for your help.