1

I’m developing a new version of a custom debugger board for my project. The debug target is a solar powered device, which means sometimes I want to power it from the host (debugger) and sometimes I want to disconnect the host power and let the target power itself.

Currently I can do this witch a single SPDT switch, the problem is many of the testing is done remotely, so this is not a good solution.

I have a FTDI chip FT232R (but I think what I’m asking applies in general) and I want to know if there are some pins I can configure for gating control via some software commands? If so, how should I deliver these commands from my computer? What I would like to do is to connect a load switch IC which would then turn on and off the power from the host to the target. Do you think this is a viable solution?

Thanks!

Jakub Nagy
  • 13
  • 2

1 Answers1

2

Each FT devices is different but most feature GPIOs. In case of the FT232R they are called CBUS. Those pin can be accessed using the dedicated D2XX driver and feature a "high drive mode" which can be setup via the eeprom programming. Alternatively one can abuse one of the control flow pins e.g. DTR or RTS - if they are not already used. Those can be typically controlled via the generic Virtual Com Port (VCP) driver. This way the hassle with the D2XX driver can be avoided. Anyway those pins are not meant as power source but they can be used to drive an LDO enable or a FET or similiar.

Christian B.
  • 1,851
  • 1
  • 5
  • 15
  • I see. I tried reading the programming docs, but even the VCP configuration seems pretty complex, using the Win32 API etc. Most importantly I found out that it’s very hard to source not only the FT232R but most of the chips from FTDI. That’s why I would opt for a alternative, such as the CP2102, coincidentally, the documentation on GPIO configuration and runtime editing seems much simpler. One more question popped up to me. I have a J-Link programmer which has its own reset pin but I would like to also use the USB RST/DTR. How can these 2 be combined? I know these cannot be on the same signal. – Jakub Nagy Jan 23 '22 at 21:09
  • One last question, you said that the pins can be configured in “high drive mode”. Does this mean it is okay to use some of the pins for power supply? The CP2102 for example has a 100mA maximum rating on its GPIOs. Is it okay I was sourcing something in the ballpark of 30-50mA from these? – Jakub Nagy Jan 23 '22 at 21:50
  • Please check the datasheet for such information. E.g. 100 mA is rather high. Thus one has to take thermal ratings into consideration. Normally the sinking and sourcing capabilities are separately rated and ideally the voltage drop out should be specified as well. But generally speaking GPIOs should not be used for powering because they are not designed for that (i.e. minimal resistance and dropout etc.). – Christian B. Jan 24 '22 at 17:31
  • Thank you! I ended up adding a load switch MIC94064 with a strong pull down. The chip can just use the GPIO to switch the load switch which in turn switches power from the LDO to the target. I hope this will work. – Jakub Nagy Jan 25 '22 at 18:31
  • happy to help. If you think this answer solved your problem, consider accepting it. Else please describe what is still missing to fully answer your question. If no answer is accepted the community bot will start necroing this post at some time in the future and this freaks me out. – Christian B. Jan 25 '22 at 18:35
  • Oh, sorry, I think it should be accepted now. – Jakub Nagy Jan 25 '22 at 21:30