7 Replies Latest reply on Mar 14, 2014 9:16 AM by user_78878863

    Utilizing VBUS ISR on CY8CKIT-030

    scott.lawson

      Hello All:

         

      I'm developing a PSoC3 device on the CY8CKIT-030 development board. I plan on using the USBUART component to communicate with it serially when plugged into a computer. It will be a self-powered device, so it may be plugged into the host computer while already running. I would like to have an interrupt service routine run when a rising edge is detected on the VBUS/VCC pin of the mini USB port (connected to a pulled-down digital input pin), which will then start the USBUART component, enumerate on the host, and transfer my data.

         

      The issue I'm having is that according to the development board user guide, the USB connector's VCC pin is tied to both the 9V battery input and the 12V AC adaptor input. The schematic shows VBUS connected to Pin 9 on the PSoC3, and when I use a voltage probe on that pin, it reads 5V if my adaptor is plugged in.

         

      How can I develop and test a VBUS-based ISR on this development board when all the power inputs are tied together?

         

      Thanks in advance for your help.

        • 1. Re: Utilizing VBUS ISR on CY8CKIT-030
          user_1377889

          Isn't the USB-connector at J2 blocking the voltages with schottky diodes? That port afaik is the one directly connected to the PSoC chip while the other is used for programming and debugging. Or has the diode reached its unglorius end?

             

           

             

          Bob

          • 2. Re: Utilizing VBUS ISR on CY8CKIT-030
            user_14586677

            Schematic attached -

            • 3. Re: Utilizing VBUS ISR on CY8CKIT-030
              scott.lawson

              Thank you both for your responses. I think I was a bit mislead by the attached portion of the schematics. I thought that meant VBUS was connected to a pin. It sounds like I won't be able to do what I want without any modifications.

                 

              My new plan is to power the board via AC adaptor, cut my USB cable, solder a pin onto the VBUS wire from the USB cable, plug it into one of the GPIO pins on the prototyping area, and try to trigger my ISR on the rising edge of that pin. Does anyone see any major flaw with that plan?

                 

              Thanks again.

              • 4. Re: Utilizing VBUS ISR on CY8CKIT-030
                user_78878863

                Page 15 in the -030 kit user guide explains how the power section work. To sum it up:

                   
                      
                • the AC adapter and the 9V battery are diode-ORed into Vin (look at the image Dana posted)
                •     
                • from Vin, all the power rails are generated (digital 5 and 3.3V rails, and analog 3.3/5V rail)
                •     
                • also, Vbus from the USB connector is diode-ORed into Vin (and in the 5V digital rail)
                •     
                • same for Vbus from the debug USB connector
                •     
                • so all of these power sources can power the PSoC, and they won't conflict with each other
                •     
                • in the schematic part you posted, R8 is marked as 'no load', so its not on the board
                •     
                • so P6_7 is not connected to Vbus2
                •     
                • but you can add it, and it will detect all a signal at Vbus2 (which is the normal USB connector)
                •     
                • Vbus2 won't be powered by any other power source (all external power sources are connected via diodes, so therew is no current backflow)
                •    
                   

                Interestingly, the section 'USB compliance for self-powered devices' in the USBFS component data sheet requires exactly what you want to do.

                   

                So just place R8 and R2 on the board (to get a voltage divider), and you should be ready to go. The voltage you are measuring can be just from the pin being an output, or from an internal pullup. The pin should not, in fact, be connected to the USB port after all.

                • 5. Re: Utilizing VBUS ISR on CY8CKIT-030
                  user_78878863

                  Whoa :(

                     

                  I made such a nice bulleted list, and then the formatting is not shown :( And I cannot go back and edit the post *desperate*

                  • 6. Re: Utilizing VBUS ISR on CY8CKIT-030
                    scott.lawson

                    Awesome. Thanks for pointing out what "No Load" means. I will get some resistors in there and make some magic happen. Thanks!

                    • 7. Re: Utilizing VBUS ISR on CY8CKIT-030
                      user_78878863

                      Welcome to the wonderful world of PSoC :)