cancel
Showing results for 
Search instead for 
Did you mean: 

PC Connection detect using FTDI chip

srm
Associate II

Posted on July 06, 2017 at 15:40

Hello,

I am working on Stm32l073 series controller. I have small question regarding the deep sleep and exit from deepsleep modes when device is not plugged to PC i must make the device go to sleep. As the Block Diagram I can make it clear. Now my question is that i would like to detect wether my device is connected to pc or not. Using some GPIO pins or an interrupt. If its connected to PC wake up the device from deep sleep or else make the device go to deep sleep mode. I had tried using the pin CBUS 3 on FTDI whenever there is high or low detection indicates connection status. But was unable to achieve. Is there any way how can I detect the status of my device connection using external interrupt or may be any ideas that I can implement through software. 

0690X00000607SkQAI.png

4 REPLIES 4
AvaTar
Lead
Posted on July 06, 2017 at 15:51

A separate GPIO to VBUS, with pull-down, to function as EXTI ?

Or would the FTDI chip give you any line status information ?

srm
Associate II
Posted on July 06, 2017 at 16:04

Sperate GPIO line with pullup 10k ohm resistor. As per the data sheet 10k ohm resistor in pullup mode yeah i am able to detect the status line to be always high even after unplugged. 

Posted on July 06, 2017 at 16:29

How is a pull-up going to help, you'll see 3.3V vs 5V, both high, so no surprise there.

A weak pull-down, associated with the USB supply on the FTDI, that would be the way to go.

A little potential divider might work even better, and you wouldn't be jamming 5V into the L0 device.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on July 06, 2017 at 17:37

If you re-read my post, i wrote pull-down. You would naturally pull to the inactive state.

And as Clive suggested, voltage dividers to be safe with the input.

I would assume you knew ...