S08MM USB leakage current

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S08MM USB leakage current

1,598 Views
elettro86
Contributor I

Hi guys,

(sorry for the bad english)

 

I have a problem with USB leakeage current. I use a S08MM64, mini-USB connector and my device is SELF POWER.

I connect USB pin number 1 with Ferrite and I connceted a polarized capacitor (4.7uF)  in series to the Ferrite. The voltage between Ferrite and the cap is Vbus and is send to microC port n.59.

 

Now I want to detach when VBUS is connect (i use the the freescale USB stack AN3582 ) so I decide to connect VBUS with some extarnal PIN of the microC.  I can't connect directly VBUS to extarnal pin beacuse I will burn microC, so I use two resistor connected in parallel with the aim to reduce the voltage. I connect  resistor 1 between the ground and port 1 of resistor 2 , port 2 of resistor 2 is connected with VBUS. Now I connect microC port n.33 with the port 1 of resitor 2.

 

The value of resistor is:

-RESISTOR n.1 (between ground and resistor n.2 ) 270K

-RESISTOR n.2 (between resistor 1 and VBUS) 470K

 

I use this value with the aim to reduce current. 

 

If I don't use the resistor the filter composed by Ferrite and cap seem work fine: infact if VBUS is connected but device is not supplied the VDD pin voltage of the microC is 0.000V. Instead if  I connected the device to the host, so VBUS is supplied, but the device is not supplied VDV voltage of the microC is 600mV.

 

Where is the mistake? Is there another better way to connect VBUS with the microC?

 

Thanks in advice

Francesco

Labels (1)
0 Kudos
Reply
7 Replies

1,291 Views
Tsuneo
Contributor IV

> Instead if  I connected the device to the host, so VBUS is supplied, but the device is not supplied VDV voltage of the microC is 600mV.

Surely, it sounds like leakage curret drives MCU VDD, passing through the VBUS sensing port, while the core powers down.

What is the voltage of VUSB33 pin (56 pin), while the device plugs in to host over USB, AND when the device powers down?
If the VUSB33 voltage is almost 0 under this condition, you may use this pin for VBUS sense, instead of VBUS directly.

Tsuneo

0 Kudos
Reply

1,291 Views
warcomeb
Contributor I

Yes, he can use VUSB33 instead VUSB, but if the usb module is disable and the cable is attached the internal regulator work fine?

 

regards

Marco

0 Kudos
Reply

1,291 Views
Tsuneo
Contributor IV

> but if the usb module is disable and the cable is attached the internal regulator work fine?

 

The on-chip USB regulator (VREG) is enabled by USBCTL0.USBVREN bit, apart from the USB engine (CTL.USBEN). As the default, it's disabled. At the power-up initialization, the firmware enables VREG, and it keeps VREG enabled.

I expect this truth table. But I'm off on vacation, so I can't confirm it on a real board. Please check it on your side.

VDD  VBUS  | Vusb33
___________________
off   off  |  off
off   on   |  off   <---- check this combination
on    off  |  off
on    on   |  on

Tsuneo

0 Kudos
Reply

1,291 Views
elettro86
Contributor I

 

Hi Tsuneo,

 

<<What is the voltage of VUSB33 pin (56 pin), while the device plugs in to host over USB, AND when the device powers down?>>

 

It is 133mV.

 

I test your combination:

 

 

 


VDD  VBUS  | Vusb33
___________________
off   off  |  at the begining 133mV, after some second (about 20) it is 5mV
off   on   |  133mV
on    off  |  1,32 V
on    on   |  3,33 V

 

 

Thank in advice for your answer

Francesco

0 Kudos
Reply

1,291 Views
Tsuneo
Contributor IV

Thanks for your measurement.

> VDD: off, VBUS: on  --> Vusb33 = 133mV

Fine. Leakage current should be trivial, when an extra port connects to Vusb33 pin for VBUS sensing.

> VDD: on, VBUS: off  --> Vusb33 = 1,32 V

A pull-down resistor of 10k - 33k, in parallel with the bypass capacitor, will drop this voltage into "low level" of the VBUS sensing port.

Tsuneo

0 Kudos
Reply

1,291 Views
elettro86
Contributor I

Hi Tsueno,

 

I disconnect the two resistor between VBUS and the port n.33 of the microC. Now the situation is: pin 1 of the USB connector is attached with ferrite and there is a polarized cap (4.7uF) in series with the ferrite. 

In this configuration when VBUS in supplied but POWER SOURCE is not supplied VDD pin of the microC is about 20mV.

 

If VDD is supplied and VBUS is not supplied, the VBUS is about 1.70 - 1.80 V

 

 

Now the measure table, at the monet I have no external microC pin for detach when USB is connected, so I use this code, inseide the routine USB_CHECK_STATUS:

 

void Check_USB_Status(void){    //#ifdef SELF_POWER   // if(PTCD_PTCD0 == USB_BUS_ATTACHED)         /* Is JM60 attached on USB bus? */    //{     // #endif        if(CTL_USBEN == 0)                     /* JM60 module off ? */         {            EPCTL0 = 0x0D;            INTSTAT = 0xBF;            CTL = 0x00;            INTENB = 0x00;                      /* disable USB interrupt*/            CTL_USBEN = 0x01;                   /* enable module */            USBCTL0 = UCFG_VAL;                 /* attach JM60 to USB bus*/            Usb_Device_State = ATTACHED_STATE;               }          //#ifdef SELF_POWER     //}    //else    //{      //  if(CTL_USBEN == 1)                      /*  JM60 USB on ?*/        //   {        // CTL = 0x00;                        /* disable module */        // INTENB = 0x00;                     /* mask USB interrupt*/        // Usb_Device_State = POWERED_STATE;              //}        //}        ////#endif        if(Usb_Device_State == ATTACHED_STATE)      {         INTSTAT = 0xBF;                        /*clear USB interrupts*/         INTENB = 0xBF;                                  }    if(Usb_Device_State == USB_ENTER_SUSPEND)    {     //   USB_Suspend();    }}

 

 

VDD  VBUS  | Vusb33
___________________

off   off  |  at the begining 133mV, after some second (about 20) it is 5mV
off   on   |  130mV
on    off  |  1,40V

on    on   |  3,54 V.

 

If the microC does not restart but VDD is supplied and VBUS is SUPPLIED Vusb33 is about 130mV

 

THIS is the hardware connection of the microC USB pin:

  -  microC pin n. 59 ithe VBUS pin, it is connect betwenn the ferrite and the polarized cap. Ferrite and the cap is connected at            the pin n.1 of mini -USB connector.

 -  microC pin. n.58 is connected with a 33 ohm resitor in series at a pin n.2 of the mini - USB connector.

 -  microC pin. 57 is connected with a 33ohm resistor in series at a pin n.3 of the mini- USB connector.

 - microC pin n.56 is the VUSB33, it is connect with a 100nF capacitor.

 

It is this hardware connection right?

 

There is always a strange microC behavior when I attached and I detached the POWER SOURCE: sometime the microC does not restart. Vdd microC pin is not high, it is 130mV immediatly after the POWER SOURCE disconnect and after 20 second the VDD pin of the microC is about 20 - 30mV. 

Today I attached port n.56 of the  microC, VBUS33, directly to another pin of the microC with the aim to detach when USB is connect/disconnect. Well, strange thing was append: my device is a SELF POWER application, so when VDD and VBUS is on the VDD pin of the micro must be low. So if I the device is supplied and the VBUS is also supply and I decide to detached the POWER SOURCE I will aspoect that the microC is not supplied. But with my great surprise I discover that the VDD pin of microC is about 2.5V and after some minutes it is 20mV. If I not connect VUSB33 microC pin to another microC this problem does not appear.

 

Thank in advice

Francesco

 


 

 

 

0 Kudos
Reply

1,291 Views
elettro86
Contributor I

Hi Tsuneo,

 

I founded a new strange thing. Sometimes when VDD is not supplied but VBUS is supplied Vusb33 is 3.54V. In this condition when I attach POWER SUPPLY the microC does not restart and the Vusb33 is about 130mV. What it's happen? 

 

Thank in advice

Francesco

0 Kudos
Reply