FTDI does not shutdown after power off - Page 1
Forum section: electronics / general

author: fsonnichsen
author_rank: Newbie
timestamp: February 02, 2021, 01:41:15 pm
content: I have an FT232R on a 3.3V board shared with a PIC microcontroller and a MAX3232 to handle the RS232 function for the latter.Since I don't have 5V on the board I use the USB/5V from the associated laptop to power the FT232R as in their datasheet.All this works fine. Except---when I power down the 3.3V board/PIC/UART, the PIC remains in a sort of 2V "half state".The FT232R is, or course, still connected to the 5V supply of the laptop. This 5V is confined only to the power pins of the FT232R and in no way ported, directly, to the board.Subsequent investigation shows that the FT232R continues to send 16ms "wake up" pulses to the MAX3232. This is in turn carried to the PIC resulting in incomplete shutdown.Apparently there is no 'DISABLE" or equivalent for the FT232R. Its #RESET and PWRDN pins are not for that purpose. Obviously I can complicate things, use a coveted PIC pin to control the FT232R, add FET circuits to disconnect the comms pins, and add source code to the PIC--all for lack of a DISABLE function.But my question is-1) Does anyone have a similar experience2) Is there some work around I missed? Programming the FT232R (yuk!)---or some better part for this?I thought this was a simple task!thanks allFritz

author: drvtech
author_rank: Regular Contributor
timestamp: February 03, 2021, 12:39:57 am
content: I've just been dealing with a similar, but not identical issue with a FT230X. In my case, the chip was remaining slightly powered up when the 5V VUSB was removed due to current being supplied by a pull up resistor on an output (or input - can't be sure at the moment). This was sufficient to get the internal VccIO regulator to try to start up and an output pin that should have been tristate was actually going low. The current through the pullup resistor was coming from son 3v3 logic supplied from another source. The solution was to put a bleed resistor on VccIO. Might be related...Dave

author: wraper
author_rank: Unknown
timestamp: February 03, 2021, 01:03:21 am
content: QuoteDo you want a separate pin named as "disable outputs only" or what? Pulling reset low will "disconnect" it as USB device and disable outputs, job done. Place a pull-down resistor on reset pin (internal 200k Pull-up) and enable it with MCU.QuoteThere is no such pin.QuoteFor what? FT232R logic (VCCIO) can operate from internal 3.3V vreg, there is no need for level shifter. Not to say MAX3232 outputs +/- 5V, there is not place for it between FT232R and MCU.

author: wraper
author_rank: Unknown
timestamp: February 03, 2021, 01:34:59 am
content: Quote from: drvtech on February 03, 2021, 12:39:57 amYou cannot do that. You are not allowed to keep VCC powered and leave VCCIO unpowered or other way around, or supply current into inputs/outputs when not powered. Either 1) both need to be powered by device, 2) when powered from VUSB, VCC from VUSB and VCCIO connected to 3V3OUT pin. Any pull-ups should be powered from the same source, obviously, or disabled somehow.QuoteThe solution - potentially kill FT230X

author: fsonnichsen
author_rank: Newbie
timestamp: February 03, 2021, 05:05:11 am
content: Sorry for the late response here--I wasn't' getting activity emails-At any rate hare are a few facts.1) Datasheet is attached.2) Regarding drvtech--I do not have a pull up resistor as none is specified. In fact--I found that the 5V on VCCIO is indeed causing the problem. I desoldered the 5V pin and the voltage on the processor zeroed out. So I contacted the FTDI folks (they are always very responsive) and they indicated that I was correct-the FT232x has a bleed current past the 5V supply into the comms lines and this causes the problem. Further there is no way to prevent this as they don't have a disable line or similar for the chip. They agree that I need FETS on the lines to the PIC to insure shutdown.Good comments Wraper. Here are some replies1) Yes--I simply need a disable--same as a lot of ICs that we use.2) The #RESET Pin is vaguely documented and I didn't think that it was a shutdown. Turns out the FTDI folks agree on that. I think maybe it receives a signal but does not power down.3) There IS a PWRDN pin and I can't blame you for not seeing it--if you check the attached doc it is obscurely mentions that this is programmed (default) via CBUS3. But it does not power down the IC. It is for powerdown USB mode on the outboard connected device.4) Sorry about the MAX3232-you are right -it is only connected via a jumper block which disconnects the FS232 so you can use either mode. (Been a while since I designed this and I forgot). SO---do ignore that. (funny emotocon BTW!)Final analysis--What is happening is that the FT232x is powering the PIC via its 5V bus and its connection to the PIC comms lines. I think the fix is to disconnect the 5V via the power to the system using a FET. This insures the FT232 does not supply power to the PIC.There is a question if this matters --and it does--My PIC system sends pulses to another board via a transistor/FET etc which sends quick pulses to an LED array. Power the array too long and it becomes toast. So when I power down the system I want it to drop in a few us. The FT232 keeps the PIC pin high and the board to the LED array stays on for a bit while it bleeds down. Not a good thing.So I will look more at this when I get time but probably will ignore the FTDI problem and address cutting off current to the LED array in a reliable way. That is the safest thing to do.I've used FTDI ICs for a while and like them (and their support) but this nuance got past me. Probably not a show-stopper now that I know about it but a problem in many cases.Thanks allFritz

author: wraper
author_rank: Unknown
timestamp: February 03, 2021, 12:40:32 pm
content: QuoteWhat's the point? Dunno what FTDI folks exactly told you about reset input, but it will disable outputs and USB as written in the datasheet. Disconnecting power from FT232R while leaving it connected to USB is a bad idea. Then you will have current leaking from PC to FT232R through data lines and likely PC showing "USB device not recognized" message. Also why are you using 5V VCCIO, not 3.3V from internal vreg, when it's connected to MCU powered from 3.3V?QuoteDo you need exact "power down" wording?

author: fsonnichsen
author_rank: Newbie
timestamp: February 03, 2021, 01:55:31 pm
content: Thanks Wraper.First let's be sure--we both mean PIN19 when we refer to the #RESET?I agree that the #RESET looks suspiciously like what I need but I avoided it based upon the advice of the vendor. Then, reading the data sheet (or looking at the block diagram):"Active low reset pin. This can be used by an external device to reset the FT232R. If not required can be left unconnected, or pulled up to VCC"Reset in this context could mean a lot of things and they don't specify. But based upon the vendor I am guessing that it only stops and starts the USB polling or something like that and DOES NOT terminate the 5V which is the root of the problem per their comments and my simple test. Common sense says "try it and see" and I would have done that 30 years ago-but these chips are darned small and you know the prospects-at any rate along with a lot of other things I will try to get it under the microscope and solder on a test lead.Re disconnecting the 5V power--I am inclined to agree with you which is why I think the vendor remiss in not having a disable outboard to the PIC.Re using the 3.3V power from the chip itself--not clear what you mean---the IC receives 5V form the PC and puts out 3.3V from it's LDO. You cant go the other way around and power the IC from its 3.3V pin. And then per my comment to dvrtech--my datasheet says the IC wants 4.0 volts. The 3.3 is an LDO and it needs a little more than that to get started.Jeeshh--I thought this would be simple--the datasheet is pretty good actually but you almost need a lawyer or bibical scholar to weed through the meaning of some terms.The price of this failing is high (burning out related $$boards$$ with the spurious power) so I probably will turn off FTDI and revert to the serial/RS232 feature of my design --I also will have some hardware timer related design to insure the LED array never gets more than a 100 Us pulse.Thanks!fritz

author: wraper
author_rank: Unknown
timestamp: February 03, 2021, 02:10:15 pm
content: Quote from: fsonnichsen on February 03, 2021, 01:55:31 pmHow about reading the datasheet more than just short pin description?Quote

author: wraper
author_rank: Unknown
timestamp: February 03, 2021, 02:14:35 pm
content: QuoteQuoteQuote

author: fsonnichsen
author_rank: Newbie
timestamp: February 03, 2021, 04:42:09 pm
content: The problem is that I did read the rest of the sheet and I "think" they are stating the putting the device in RESET applies a pull-up on the internal FTDI UART pins-which is the start of the problem.Maybe I confused you on the VCCIO issue-I didn't understand your post at first.To begin with-I can connect VCCIO to the 3.3V output of the FTDI chip. I think the PIC tolerates either input (5 or 3.3) but 3.3V makes more sense here as you indicate.If you look at diagram 6.3 if I remove the ferrite bead the PIC pins go to zero as desired. So we know from this that the power that is putting these in a "partial" state is from the USB bus and NOT the io-comms pins.That the USB Bus goes to both Vcc and VCCIO is immaterial if power is switched off at the ferrite bead location. But to keep power up on the IC AND cut it to the forward circuit I would think the switch would be placed at VCCIO-but not sure. This would keep the PC/USB port working (Vcc is still powered) but cut off power to the FTDI-UART and hopefully no longer power the PIC. Same applies if I put the switch at the 3.3V supply of the IC.I suppose all this goes away if a self powered configuration is used with a 5V converter to the FTDI IC. When the main power is shut, the converter dies and the IC is powered off. But if I read the datasheet correctly---"The power descriptor in the internal EEPROM of the FT232R should be programmed to a value of zero(self-powered)." I don't want to get into that for a whole lot of reasons.ThanksFritz

author: wraper
author_rank: Unknown
timestamp: February 03, 2021, 05:18:58 pm
content: QuoteEven if it says it has 5V tolerant inputs, it's not a good idea to pass logic high level with reduced voltage into FT232R. Also if MCU has 5V tolerant GPIO, due to how ESD protection is made in such devices, usually there should be no leakage through ESD protection when applying voltage to GPIO of MCU which is not powered.Quote200k pull-ups are always there on inputs, reset has nothing to do with them. Also current flowing through them is negligible to even bother.QuoteAs I already wrote, you are not allowed to do that. If FT232R is powered at all, power must be applied to both VCC and VCCIO.QuoteInstead of using straightforward solution, you want to invent a bicycle with square wheels. Just use RESET pin FFS.

author: fsonnichsen
author_rank: Newbie
timestamp: February 03, 2021, 06:42:14 pm
content: Thanks- I am having a "shaky" day but when I am up for it I will solder a tiny wire to the #RESET pin and check out this feature. I'll let you all knowThanks!fritz

author: Ian.M
author_rank: Super Contributor
timestamp: February 03, 2021, 08:01:09 pm
content: The datasheet is incomplete. It doesn't give any data for Vccio in the Absolute Maximum Ratings section. It *MUST* be supplied from the same source as Vcc, which I would take to mean Vccio *MUST* *NOT* be powered when Vcc isn't, but I don't see it explicitly mentioned anywhere that Vccio must be powered when Vcc is.Probably the easiest bodge fix would be to pull up FTDI RESET# with a 100K resistor to Vcc/Vbus, and connect a schottky diode to PIC Vdd to pull it down when the target isn't powered. It would probably also be a good idea to schottky clamp the affected I/O pins to the PIC Vdd and enable BOR on the PIC. I suspect that it will also need 4K7 from Vdd to Gnd to sink the leakage current from the FTDI pullups and keep Vdd low enough not to cause problems.A proper fix would use something like 74LVC1G45 or '2G45 level translators which have two separate supply pins and are specified to tristate the powered side if the opposite side is unpowered.

author: fsonnichsen
author_rank: Newbie
timestamp: February 04, 2021, 03:02:08 am
content: Thanks Ian.The datasheet is indeed vague on this issue of VCCIO. My understanding is that VCCIO provides the voltage levels for the device communicating to its UART--the PIC in this case. So (wraper mentioned this) VCCIO really should be powered at 3.3V (the PIC is a 3.3V device). This is done by connecting VCCIO to the 3.3V LDO provided on the FTDI device. HOWEVER----the FTDI needs to be powered by at least 4V (as we don't have an external crystal) so we power it from the USB bus at 5V. This of course creates a discrepancy between Vcc and VCCIO (5V vs 3.3V). Is that OK? Well-not sure from the datasheet. At some point this all gets to be like doing income taxes here in the US.I agree on pulling down the 2 PIC Vdd pins with a schottky. I think this is the only place on the PIC where they would be needed.This started out simple but I am growing a monster--and of course the old-fashioned UART/serial alternative on this board just chugs along fine as always. Used them for over 30 years but the guys here want their darned USB!I have a lot going on but will get back in the lab an play with this and get back to ya'llThanksFritz

author: Ian.M
author_rank: Super Contributor
timestamp: February 04, 2021, 03:34:15 am
content: Vccio can be powered from a different voltage to Vcc. See datasheet fig 6.4 (p22) which shows Vccio jumper selectable between +5v from USB Vbus, or +3.3V from 3.3Vout. What youabsolutely cant dois power Vccio externally in such a way that it stays on when Vcc goes away due to USB unplug or host powerdown.Personally I think the datasheet is missing a line in the absolute max ratings section. It should probably restrict Vccio to -0.5V to Vcc+0.5V but that's just my guess at its probable abs. max. limits. Operating limits are listed as +1.8V to +5.25V, but I'm suspicious of those if Vcc is at its lower limit of +4V. I suspect it should actually be +1.8V to Vcc, otherwise why do FTDI bother to tell us for Vccio that:Quote from: datasheet p7

author: wraper
author_rank: Unknown
timestamp: February 04, 2021, 10:58:33 am
content: Quote from: fsonnichsen on February 04, 2021, 03:02:08 am4V for VCC, not VCCIOQuoteDatasheet shows more than clearly they don't need to be the same, and explicitly says that VCCIO can be powered from 3.3V output. I wonder how did you even came up with a dumb conclusion they should be the same.Also, are you blind, or what? It was already given to you on a silver platter.Quote from: wraper on February 03, 2021, 02:14:35 pm

author: aholtzma
author_rank: Contributor
timestamp: November 29, 2022, 08:46:15 pm
content: Does anyone know if the VCC/VCCIO same source constraint applies to FT230X or FT231X? The docs for these parts don't have the "same source as as the supply to VCC" verbiage.

author: peter-h
author_rank: Super Contributor
timestamp: December 01, 2022, 09:22:13 pm
content: Would be interesting, especially since those parts are much cheaper than the FT232 which has become an extortionists' paradise.