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.

ADS7028: Channel 0 GPIO Constant High Issue

Part Number: ADS7028
Other Parts Discussed in Thread: ADS7128

Tool/software:

Hello, we have a brand new problem with ADS7028.

In our setup, we have 3 ADS7028 sensors to read analog data. They all have an input channel and a ZCD output channel. Inputs are also connected to RMS module. 

For the 2 ADS7028s, everything works correctly and we have a clear square waveform output from the ZCD output pin. But for the last one, we couldn't produce the ZCD. Following are the settings and register values for this specific sensor:

Input channel = 1

ZCD output channel = 0

To set ZCD pin as output:

1. PIN_CFG_REGISTER = 0x01 (For setting as GPIO)

2.GPO_DRIVE_CFG = 0x01 (For push-pull)

3. GPO_VALUE = 0x00 (To make sure it is starting as low)

ZCD settings:

1. CHANNEL_SEL = 0x10 (Treat channel 1 as input to ZCD) 

2. HYSERESIS_CH1 = 0xF0

3. HIGH_TH_CH1 = 0x7F

4. GENERAL_CFG = 0x30 (DWC_EN and STATS_EN are active. STATS_EN is activated before)

5. GPO_VALUE_ZCD_CFG_CH0_CH3 = 0x02 (To produce a signal only at crossings from negative to positive)

6. ZCD_BLANKING_CFG = left at default

7. GPO_ZCD_UPDATE_EN = 0x01 (Update channel 0 wrt ZCD)

These are the specific settings we did. I made sure they are like this by reading them back after writing to them. Everything looks in order. The rest of the ADS7028 settings are similar, only register values change wrt their particular input and ZCD channels. The channel arrangements are different for all of them. The input channel and other analog channels are automatically sequenced after making the arrangements, but ZCD pin always outputs HIGH signal. 

We couldn't solve this issue, so we made some arrangements. We changed the ZCD output channel from 0 to 6 and it started to work like a charm. That raised the question, is there something innately wrong with channel 0? Then we set that channel as a regular output pin and tried to drive it low or high programatically, and it failed. We can't drive channel 0 to low. It always stays at high and never ever outputs low.

There are no pull-ups or downs. We even took out the following circuit to make sure nothing affects our setup. So channel 0 doesn't connect to anywhere. We conducted all of these with an oscilloscope. So the question is, is there something wrong with channel 0? Shouldn't we use channel 0 as an output GPIO and for ZCD output? 

Thanks in advance.

P.S. This is the 4th ADS7028 we tried to make sure the IC doesn't have a physical issue.

  • Hi Ege,

    Are all 3 devices connected to the same I2C bus? In what order are they being configured? Does the order that they are configured affect the result, or are you not able to configure channel 0 as the ZCD channel output on any of the devices? What configuration do the other 2 devices that work use?

    Are you able to share a logic capture of your full sequence? I can try to recreate it and  look for the same issue. This has not been an issue we have previously encountered, so I don't have specific recommendations at the moment, especially since you have 2 other devices successfully configured.

    Regards,
    Joel

  • Hey Joel,

    Are all 3 devices connected to the same I2C bus?

    - Yes they are connected to the same SPI bus. I have 3 separate GPIOs to use as CS and they work how they supposed to (verified by oscilloscope). 

    In what order are they being configured?

    - I didn't understand what you mean by order. I'm configuring them one by one and the problematic one is the second one. 

    Does the order that they are configured affect the result, or are you not able to configure channel 0 as the ZCD channel output on any of the devices?

    - I didn't recognize a direct correlation with config order. I actually did not try configuring others' channel 0 as ZCD output since that wasn't necessary for our circuit. But we have tried 4 different ADS7028 and they all had the same problem.

    What configuration do the other 2 devices that work use?

    - One's input is channel 6 and ZCD output is channel 7. The other's input is channel 5 and ZCD output is channel 4. These work without a problem.

    Are you able to share a logic capture of your full sequence?

    - I don't really know what you mean by this. Do you mean the order of register writings for configurations or something like that? 

    I realize this is an odd problem, but if you can provide some type of explanation or solution, we would really appreciate it. We don't want to send our PCB for revision just to change a pin on a sensor. 

    For recreating the situation, it is basically like this. An AC input goes into the channel 1 which is both connected to RMS and ZCD modules. ZCD output is designated as channel 0, but this pin always stays at high level.

    Thanks,

    Ege

  • Hi Ege,

    I confused this device with the ADS7128, which is the I2C version of this device. My mistake.

    As I understand it, you have tried configuring channel 0 as the ZCD output on all the devices you have connected to your controller, and it does not work on any of the devices. Channels other than channel 0 do work as the ZCD output.

    It's highly unlikely that this is a device failure since you've seen it on 4 different devices. With that said, allow me some time to recreate the register configuration sequence you've provided, and check if I see the same result. If I do, then we have to update the documentation at the very least.

    Regards,
    Joel

  • Hey Joel,

    Are there any updates on this issue?

    Regards,

    Ege

  • Hi Ege,

    Apologies for the delay. I haven't yet tested this. I will give you an update of my test results within 24 hours. I believe I have enough information to try to recreate your sequence.

    Regards,
    Joel

  • Hi Ege,

    I'm having some hardware issues I'm trying to solve at the moment.

    I did notice one thing however. Have you configured the GPIO_CFG register to set AIN0 as a digital output? I'm not sure at the moment if this is required, seeing as the other ZCD outputs work fine, but it's worth a try. I will keep working on trying to recreate the issue.

    I also want to look into the point you made earlier, where you set AIN0 as an output, and it did not respond to manual programming.

    Regards,
    Joel

  • Hey Joel,

    I did notice one thing however. Have you configured the GPIO_CFG register to set AIN0 as a digital output? I'm not sure at the moment if this is required, seeing as the other ZCD outputs work fine, but it's worth a try.

    Yes, I believe that is necessary to make ZCD output working. I have done this setting for all 3 ADS7028s. For the problematic one, I wrote 0x01 to PIN_CFG_ADDRESS and 0x01 to GPIO_CFG_ADDRESS to make pin 0 GPIO output.

    I also want to look into the point you made earlier, where you set AIN0 as an output, and it did not respond to manual programming.

    Yes, to me this seemed like the bigger issue and the root of the problem. 

    Regards,

    Ege

  • Hi Ege,

    I realized I will need to modify my board to disconnect a voltage buffer from the input of AIN0 before trying to drive a high voltage when it is configured as a GPIO.

    In the time being however, I am seeing the same issue you describe, where AIN0 does not change value when it is configured as an output, but again, I'll try to disconnect the buffer and try again. I would expect some jump in the voltage at the very least, but I am not seeing that. It would be unfortunate if this is something that was overlooked. You have already mentioned it doesn't change even when the pin is floating, so I expect that will also be my experience.

    I'll modify my board and share my final findings, but so far, it seems like this could be a device issue gone unnoticed.

    Regards,
    Joel

  • Hey Joel,

    Thanks for the effort. Waiting for the final update.

    Regards, 

    Ege

  • HI Ege,

    I was able to get some leads on a possible solution. By default, AIN0/GPIO0 should be configured as the ALERT pin when it is set as a GPIO output, and that takes priority over all other operations. 

    Can you try changing the ALERT_PIN[3:0] field in the ALERT_PIN_CFG (address 0x17) register to a channel other than 0? This should be better documented in the datasheet, and this functionality was not something I was fully aware of either. I hope that works as a solution, but it seems like AIN0 should generally be avoided as a digital output.

    Regards,
    Joel

  • Hey Joel,

    Thanks for the suggestion. I will try this solution and provide an update.

    Regards,

    Ege

  • Hey Joel,

    I tried the solution and it worked wonders. Pin 0 started to work as normal like other GPIOs.

    Thanks for the solution. But please update the datasheet, this is a really niche problem and someone have to come across this post to find the solution which is far from ideal. 

    Best regards,

    Ege

  • It's definitely an obscure issue that should be documented in the datasheet. I'm glad that fixed it. 

    Regards,
    Joel