Why is the tablet only drawing 0.6 amps over USB-C with power delivery protocol? - usb

I've build a board with and ESP32 and a USB-C type connector with a FUSB302B Programmable USB Type‐C Controller.
I implemented the power delivery protocol and can do a successful power role swap between the ESP32 and a tablet. Upon connecting the tablet to the board, the tablet provides the power to the board and after a power role swap the board provides the power to the tablet.
But after the power role swap the tablet only draws 0.6 amps, and not the negotiated 1.5 amps. How is this possible?
During the power negotiation I send the source capabilities (5v / 1.5 amps), the tablet then requests the 5v / 1.5 amps. Then I accept the request and send a power source ready. (There is now a contract between them). But the tablet is only drawing the 0.6 amps.
I would expect that the tablet would draw 1.5 amps. If I connect the tablet to my laptop usb-c connection with power delivery, it draws the 1.5 amps.

Related

Bootloader access over CANBUS on Nucleo-F446RE

I am trying to flash code over CANBUS on Nucleo-F446. I am referring this application notes
https://www.st.com/resource/en/application_note/cd00264321-can-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf
So according to it in Boot mode the default baud rate of CAN is 125KBPS and we need to use PB5 and PB13 pin which are CAN2 pins.
For testing I tried to send CAN message with DLC=0 and STDID = 0x79 for which STM32 should return a ACK with same ID i.e. 0x79.
But I am not getting any response.
You must add a external clock to your Nucleo Board
The system clock is derived from the embedded internal high-speed RC for USARTx and
I2Cx bootloaders. This internal clock is also used for CAN and DFU (USB FS Device) but
only for the selection phase. An external clock multiple of 1 MHz (between 4 and 26 MHz) is
required for CAN and DFU bootloader execution after the selection phase.
STM Bootloader Description

How many isochronous USB2.0 devices can a USB3.0 Hub enumerate?

I am working on a hardware-embedded software project involving USB protocol. My plan is to use a USB3.0 Hub that clusters many USB2.0 isochronous devices, each requiring around 33 Mbps BW.
Now, I know that USB3 is able to enumerate up to 127 devices [1], what I'd like to know is whether this is true if I connect USB2 devices to the USB3 Hub. Can I, in theory, use the hub with 97 USB2 devices?
Also, could I utilize the entire BW (yes, only around 70% is feasible) of a USB3 port this way? The above figures add up to 5 Gbps*70% = 3.2 Gbps = 97*33Mbps.
Any help is much appreciated.
I believe there is some confusion with your understanding.
USB 3.0 hub contains 2 logical hub partitions.
1 - USB 3.0 hub
2 - USB 2.0 hub
USB 2.0 devices communicate through the USB 2.0 hub data path which has nothing to do with USB 3.0 data path. So the assumption of the bandwidth is incorrect as they are for USB 3.0 devices connected via USB 3.0 data path.
Also USB 2.0 devices will get connected via USB 2.0 lines and NOT USB 3.0 lines.
Another misconception in your question.
The speed which you mentioned i.e. 5 Gbps, that is USB 3.0 link speed.
What that means is that 2 devices over USB 3.0 link can send or receive data at 5 Gbps. Since every hub downstream port is physically a separate link, the link speed will be same for all i.e. 5 Gbps. So its speed between 2 link partners and not end to end speed.
Now when you say End to End data transfer rate, that will depend on your host controller driver architecture, your OS performance, your Hub, etc.
For Isochronous endpoints, the hub will start data transfer on service intervals for each endpoints on each port as per USB spec but you cannot be sure that End to End data transfer rate will be equally divided.
PS - You will get a lot less end to end bandwidth by the way as the link speed for USB 2.0 is 480 Mbps. :)

Raspberry Pi2 running Windows 10: No PWM

I have a Raspberry Pi2 running Windows 10. I want to control a servo using PWM (porting some netduino code). There does not appear to be a PWM pin at all on the Pi-> with the possible exception of 12 (GPIO 18). Can someone confirm this?
Thanks
Hardware PWM and ADC are not supported right now on RPi2 (Windows IoT). You need some extra circuitry which can generate PWM or record ADC on demand. There some project works available for that.
How you can achieve PWM & ADC on RPi2 + Windows IoT?
RPi2 will be connected to a gateway device via I2C/SPI Bus. A gateway device is nothing more than a microcontroller like Arduino. We need to program gateway to respond RPi2. Gateway device will act as I2C/SPI slave. Whenever RPi2 requests to write specific PWM pin, Gateway will generate PWM for that pin on demand.
Something you might like:
PWM Servo Control (RPi2 + Windows IoT):
https://www.hackster.io/AnuragVasanwala/windows-10-iot-core-ultrasonic-distance-mapper-d94d63
PWM Motor Speed Control & Retrieve ADC (RPi2 + Windows IoT):
https://www.hackster.io/AnuragVasanwala/windows-10-iot-core-hydroflyer-f83190
Yes and I doubt it will ever be added to Windows. Windows isn't a "Real Time" OS so it can't make the precise microsecond pulses required for PWM hardware.
Apparently there are breakout boards that could do this (ex: https://www.adafruit.com/products/815)
I haven't tried any yet though.

USB Full Speed polling interval

I have 1 Full Speed (12 Mbps) CDC-ACM type USB device connected directly to a High Speed (EHCI - 480 Mbps) controller on a SoC.
When there is no user-space application opening the CDC-ACM device in linux, I see a pulse which is repeated every 1 ms (SOF). Once an application (example cat) opens the CDC-ACM device, I see a lot of IN tokens (~102) between 2 SOF's from the host and the device NAKs the IN token. We are suspecting the device is busy NAKing that it hampers its operation.
Q1: Is there a way to reduce the number of IN tokens within the 1 ms interval?
Thanks
0_l_0

Routing Multiple USB 2.0 connections through a USB 3.0 connection

Is there any USB 3.0 hub or device that multiple USB 2.0 devices can be connected to and still retain the maximum USB 2.0 bandwidth for each device by utilizing the higher bandwidth of USB 3.0?
These devices exist for USB2.0/1.1 interfacing (they are called Multi-TT USB hubs).
Are there any such devices that exist for USB3.0/2.0? What I'm trying to do is connect 3 high-bandwidth USB 2.0 cameras to one USB 3.0 port.
I've been personally trying to find details about this as well. I'm trying to get multiple USB based audio cards to MUX over USB 3.0.
So far the following two URLs are giving me my details:
http://www.via-labs.com/en/products/vl810/index.jsp
http://electronicdesign.com/embedded/what-s-difference-between-usb-20-and-30-hubs
-- 1 --
This is interesting because it shows a block diagram of the VIA VL810 controller chip. Unfortunately, it sure looks like the USB2.0 functions are completely seperate from the USB 3.0 sections. This leads me to believe that, at least this chip, and HUBs that use it, can not multiplex USB2.0 transfers over USB3.0.
-- 2 --
This site spends a lot of time talking about how the HUBs are suppose to work. It takes the time to explain that the USB3.0 bus is separate from the USB2.0 bus:
Within the hub, only the port power control logic is shared between the USB 3.0 path and the USB 2.0 path, since there is only one 5-V power path in either USB 2.0 or USB 3.0.
This leads me to assume that most if not all current USB 3.0 HUBs can't multiplex.
You comment about Multi-TT Hubs being available for USB 2.0/1.1 gives me hope that some time in the (near?) future we'll have the same ability with USB3.0/2.0.