"Guaranteed Reset" signal controllable via I2C - Page 1
Forum section: electronics / projects

author: tom66
author_rank: Super Contributor
timestamp: March 09, 2024, 02:53:42 pm
content: We've got a product with an I2C expander on it (PCA9557) which controls a few IOs.One of these IOs determines what power source a microcontroller uses. Unfortunately, sometimes the PCA9557 comes up in the wrong state (usually the previous one after a power cycle), which stops the system from working.To work around this, I need some kind of way to guarantee this signal is in the correct state until the microcontroller writes a setting to it. I don't have any more IOs spare on the connector, so it has to interface over I2C.Note that I can't simply use the RESET input on the PCA9557 - because that's an IO and I don't have any spare pins. I would need a reset controller I can talk to that could actuate this pin, or something to override the output of the PCA9557.Is anyone aware of a part to solve this problem?

author: selcuk
author_rank: Frequent Contributor
timestamp: March 09, 2024, 03:44:38 pm
content: There is an errata in the datasheet about power on reset. I recommend you to use a voltage supervisory chip with a guaranteed reset pulse width. For example APX811 has a 200ms reset pulse.By the way, these IC series usually has a TCA equivalent (i.e. TCA9557) which has the issue fixed. But this one seemingly doesn't have that part.

author: Siwastaja
author_rank: Super Contributor
timestamp: March 09, 2024, 04:07:00 pm
content: Really, I would consider replacing the PCA9557 with something which isn't as broken. By the time you have added another "this booted in wrong state" supervisor which acts as another master on I2C and provides initial configuration, which would need to be an MCU, you would have been better off to just use that MCU in place of PCA9557 as a custom IO expander of your own; or even better, just replacing the main microcontroller with a larger one with enough IO.

author: Peabody
author_rank: Super Contributor
timestamp: March 09, 2024, 04:12:02 pm
content: Is there any chance that a capacitor on the chip's /Reset pin would slow down its rise enough to solve the problem? You would have a high-value pullup resistor with a parallel diode to discharge the capacitor when power drops. But when power comes up again, the cap would have to charge through the resistor, producing some delay.

author: wraper
author_rank: Unknown
timestamp: March 09, 2024, 04:13:01 pm
content: Beside ensuring power rise time to avoid the issue described in ERRATA, you can simply add a circuit that resets it on each power on regardless if it started properly or not. However as Siwastaja suggested, I'd just switch to another chip that isn't broken, it's not like it's something unique or particularly cheap that you'd need to chose it over something else.

author: voltsandjolts
author_rank: Unknown
timestamp: March 09, 2024, 04:24:46 pm
content: NXP version any better?

author: wraper
author_rank: Unknown
timestamp: March 09, 2024, 04:36:05 pm
content: Quote from: voltsandjolts on March 09, 2024, 04:24:46 pmNXP chip does not seem to have any errata, so it could be as simple as not using TI chip.

author: Peabody
author_rank: Super Contributor
timestamp: March 09, 2024, 04:54:27 pm
content: I'm not sure doing a reset would solve the problem. In this link:https://e2e.ti.com/support/interface-group/interface/f/interface-forum/641793/pca9557-about-pca9557-and-tca9557Bobby of TI says "reset pin does reset the internal state machine."

author: tom66
author_rank: Super Contributor
timestamp: March 09, 2024, 05:47:56 pm
content: To be clear, this issue isn't directly related to the POR reset errata. It's just the case that when 3V3 rail turns off, it sits around 1.2V for some time, which is sufficient to retain their state. It seems these chips do not POR reset until their supply drops well below 1V. Applies to both NXP and TI parts, we've tested both.Replacing the PCA9557 is a possibility, but would create potential firmware backwards compatibility issues (I would need to support both IO expander options as we release firmware updates for older units too.)

author: ejeffrey
author_rank: Super Contributor
timestamp: March 09, 2024, 06:27:08 pm
content: So the issue is that when you are trying to power cycle you effectively have only a brownout where some chips reset and others do not?Can you just add a bleed resistor to the power supply? It sounds like when the voltage gets below ~2 diode drops the load current goes away and the power supply filter capacitors are not discharged. Adding a bleed resistor, and/or enforcing a minimum off time might solve that.Beyond that, this is exactly what power supervisors are for. You set a brownout threshold above the operation threshold for every chip in your design and then you use it as a global reset. It's possible to roll your own with transistors and RC networks but since the whole point is having well defined behavior during power transients it can be a bit subtle and it's often easier to use a dedicated IC.

author: Siwastaja
author_rank: Super Contributor
timestamp: March 09, 2024, 07:00:26 pm
content: Yeah, a power supervisor IC, basically a reference+comparator with pulse generator all integrated, could drive the nRESET input of PCA9557 (and the reset pins of everything else, too). You don't need to add any programmable device then.

author: wraper
author_rank: Unknown
timestamp: March 09, 2024, 08:23:29 pm
content: ^Yes, just add a supervisor IC as you don't want to maintain firmware for different HW.

author: wraper
author_rank: Unknown
timestamp: March 09, 2024, 08:29:19 pm
content: TLV809E for example.

author: tom66
author_rank: Super Contributor
timestamp: March 09, 2024, 08:51:29 pm
content: Thanks for the suggestions.Due to the low power operation, a bleed resistor won't be something that can be used. I'll see if I can use a reset supervisor.

author: voltsandjolts
author_rank: Unknown
timestamp: March 09, 2024, 09:04:18 pm
content: Quote from: tom66 on March 09, 2024, 05:47:56 pmCould just be caps holding the rail up when the circuit is a low power design...but could also be some 'phantom power' arriving through IO lines or comms lines, and preventing that could help the supply rail drop quicker. Just a thought.

author: Peabody
author_rank: Super Contributor
timestamp: March 09, 2024, 10:55:43 pm
content: If you go with a different chip, the TCA9554 might work. If I understand correctly, the TCA parts have corrected the problem with the PCAs. But not a drop-in replacement.

author: ejeffrey
author_rank: Super Contributor
timestamp: March 10, 2024, 12:50:03 am
content: Quote from: tom66 on March 09, 2024, 05:47:56 pmAs I understand it, part of the POR errata is that Vcc must go all the way down to 0.2 V for 100 ms to guarantee a reset in addition the the maximum rise time. However even the TCA chips seem like they may need to go down to 0.75 V, at least if I'm reading the data sheet correctly. I think a stand alone non programmable reset controller is probably the best option, it seems like that should solve the problem entirely.

author: BrianHG
author_rank: Super Contributor
timestamp: March 10, 2024, 02:49:26 am
content: Quote from: tom66 on March 09, 2024, 02:53:42 pmIf it weren't for the location of the VCC&GND pins in 16 pin PIC microcontrollers, I would have already written a software emulation of the PCA9557 in the cheapest 16 pin PIC running on it's own internal oscillator and just plug that replacement in.I could set the brown-out detect to what voltage I like and set my own power-up defaults.