Author Topic: FTDI does not shutdown after power off  (Read 2577 times)

0 Members and 1 Guest are viewing this topic.

Offline fsonnichsenTopic starter

  • Newbie
  • Posts: 9
  • Country: us
FTDI does not shutdown after power off
« on: February 02, 2021, 01:41:15 pm »
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 experience
2) 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 all
Fritz
 

Offline drvtech

  • Regular Contributor
  • *
  • Posts: 111
  • Country: gb
Re: FTDI does not shutdown after power off
« Reply #1 on: February 03, 2021, 12:39:57 am »
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
« Last Edit: February 03, 2021, 12:41:50 am by drvtech »
 
The following users thanked this post: fsonnichsen

Online wraper

  • Supporter
  • ****
  • Posts: 16860
  • Country: lv
Re: FTDI does not shutdown after power off
« Reply #2 on: February 03, 2021, 01:03:21 am »
Quote
Its #RESET and PWRDN pins are not for that purpose
Do 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.
Quote
PWRDN
There is no such pin.
Quote
MAX3232 to handle the RS232 function for the latter
For 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  :-//.
« Last Edit: February 03, 2021, 02:32:37 am by wraper »
 

Online wraper

  • Supporter
  • ****
  • Posts: 16860
  • Country: lv
Re: FTDI does not shutdown after power off
« Reply #3 on: February 03, 2021, 01:34:59 am »
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.
Dave
You 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.
Quote
The solution was to put a bleed resistor on VccIO. Might be related...
The solution - potentially kill FT230X
 

Offline fsonnichsenTopic starter

  • Newbie
  • Posts: 9
  • Country: us
Re: FTDI does not shutdown after power off
« Reply #4 on: February 03, 2021, 05:05:11 am »
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 replies
1) 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 all
Fritz



 

Online wraper

  • Supporter
  • ****
  • Posts: 16860
  • Country: lv
Re: FTDI does not shutdown after power off
« Reply #5 on: February 03, 2021, 12:40:32 pm »
Quote
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.
What'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?
Quote
I think maybe it receives a signal but does not power down.
Do you need exact "power down" wording?  |O
« Last Edit: February 03, 2021, 12:44:44 pm by wraper »
 
The following users thanked this post: fsonnichsen

Offline fsonnichsenTopic starter

  • Newbie
  • Posts: 9
  • Country: us
Re: FTDI does not shutdown after power off
« Reply #6 on: February 03, 2021, 01:55:31 pm »
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
 

Online wraper

  • Supporter
  • ****
  • Posts: 16860
  • Country: lv
Re: FTDI does not shutdown after power off
« Reply #7 on: February 03, 2021, 02:10:15 pm »
"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.
How about reading the datasheet more than just short pin description?
Quote
When the FT232R is in reset, the UART interface I/O pins are tri-stated. Input pins have internal
200kΩ pull-up resistors to VCCIO, so they will gently pull high unless driven by some external
logic.
 

Online wraper

  • Supporter
  • ****
  • Posts: 16860
  • Country: lv
Re: FTDI does not shutdown after power off
« Reply #8 on: February 03, 2021, 02:14:35 pm »
Quote
In fact--I found that the 5V on VCCIO is indeed causing the problem.
Quote
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.
Quote
VCCIO
+1.8V to +5.25V supply to the UART Interface and CBUS group pins
(1...3, 5, 6, 9...14, 22, 23). In USB bus powered designs connect this pin
to 3V3OUT pin to drive out at +3.3V levels
, or connect to VCC to drive
out at 5V CMOS level. This pin can also be supplied with an external
+1.8V to +2.8V supply in order to drive outputs at lower levels. It should
be noted that in this case this supply should originate from the same
source as the supply to VCC.
This means that in bus powered designs a
regulator which is supplied by the +5V on the USB bus should be used.
« Last Edit: February 03, 2021, 02:18:10 pm by wraper »
 

Offline fsonnichsenTopic starter

  • Newbie
  • Posts: 9
  • Country: us
Re: FTDI does not shutdown after power off
« Reply #9 on: February 03, 2021, 04:42:09 pm »
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.

Thanks
Fritz

 

Online wraper

  • Supporter
  • ****
  • Posts: 16860
  • Country: lv
Re: FTDI does not shutdown after power off
« Reply #10 on: February 03, 2021, 05:18:58 pm »
Quote
I think the PIC tolerates either input (5 or 3.3) but 3.3V makes more sense here as you indicate.
Even 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.
Quote
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.
200k pull-ups are always there on inputs, reset has nothing to do with them. Also current flowing through them is negligible to even bother.
Quote
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
As 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.
Quote
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.
Instead of using straightforward solution, you want to invent a bicycle with square wheels. Just use RESET pin FFS.
« Last Edit: February 03, 2021, 05:23:26 pm by wraper »
 

Offline fsonnichsenTopic starter

  • Newbie
  • Posts: 9
  • Country: us
Re: FTDI does not shutdown after power off
« Reply #11 on: February 03, 2021, 06:42:14 pm »
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 know
Thanks!
fritz
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12859
Re: FTDI does not shutdown after power off
« Reply #12 on: February 03, 2021, 08:01:09 pm »
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.
 

Offline fsonnichsenTopic starter

  • Newbie
  • Posts: 9
  • Country: us
Re: FTDI does not shutdown after power off
« Reply #13 on: February 04, 2021, 03:02:08 am »
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'll

Thanks
Fritz
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12859
Re: FTDI does not shutdown after power off
« Reply #14 on: February 04, 2021, 03:34:15 am »
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 you absolutely cant do is 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
It should be noted that in this case this supply should originate from the same source as the supply to VCC. This means that in bus powered designs a regulator which is supplied by the +5V on the USB bus should be used.
« Last Edit: February 04, 2021, 03:45:02 am by Ian.M »
 

Online wraper

  • Supporter
  • ****
  • Posts: 16860
  • Country: lv
Re: FTDI does not shutdown after power off
« Reply #15 on: February 04, 2021, 10:58:33 am »
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.
4V for VCC, not VCCIO
Quote
This of course creates a discrepancy between Vcc and VCCIO (5V vs 3.3V).  Is that OK?  Well-not sure from the datasheet.
Datasheet 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
VCCIO
+1.8V to +5.25V supply to the UART Interface and CBUS group pins
(1...3, 5, 6, 9...14, 22, 23). In USB bus powered designs connect this pin
to 3V3OUT pin to drive out at +3.3V levels
, or connect to VCC to drive
out at 5V CMOS level. This pin can also be supplied with an external
+1.8V to +2.8V supply in order to drive outputs at lower levels. It should
be noted that in this case this supply should originate from the same
source as the supply to VCC.
This means that in bus powered designs a
regulator which is supplied by the +5V on the USB bus should be used.
« Last Edit: February 04, 2021, 11:16:24 am by wraper »
 

Offline aholtzma

  • Contributor
  • Posts: 20
Re: FTDI does not shutdown after power off
« Reply #16 on: November 29, 2022, 08:46:15 pm »
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.
 

Offline peter-h

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: gb
  • Doing electronics since the 1960s...
Re: FTDI does not shutdown after power off
« Reply #17 on: December 01, 2022, 09:22:13 pm »
Would be interesting, especially since those parts are much cheaper than the FT232 which has become an extortionists' paradise.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf