If the timers are not managed (decremented) the stack will be not able to send the message.The technology offers a single platform connector carrying all the necessary lines: USB 2.0, USB 3.x, and power.To change dynamically who provides VBUS, independently of the USB data role.
Whenever you have a legacy cable (Type-A to Type-C for example), to comply with the specification, it has an integrated resistor. As the Type-AB does not have a CC line in the connector, the power role is determined by the pull-updown resistor in the plug. In that case, you do not need an MCU with the UCPD peripheral inside. Reminder: even if there is only one CC line used for communication, you need to manage both lines, because you cannot guess how the cable will be plugged. The device part depends on the STM32 family (STM32G0, STM32G4.). This is where the strategy (choose the maximum power.) is coded. STM32G0 is the only family with parts that contain up to 2 UCPD instances. Or if you have downloaded the package through STM32CubeMX: c:Users yourlogin STM32CubeRepositorySTM32CubeFWG0V1.3.0. Check your PDOs either in the file usbpdpdodefs.h, or if you have activated the utility (GUIINTERFACE switch), in the STM32CubeMonitor-USBPD Port ConfigurationSINK Capabilities tab. Perhaps your operational current is too high with respect to what your source can provide. The numbers indicated in the trace are the TimeStamp and the port number. TimeStamp can be practical to debug real-time issues). This variable can be used to check the Type-C attachment or detachment. In STM32G4 versions before FW 1.2.0, the correct compilation switch is not set. An easy way to correct this issue is to activate the compilation switch MB1367. The idea is to post a request to the stack and when the stack is ready, it will consume this request to send it to the port partner. Another request sent whereas the previous one has not been consumed will be not taken in account (USBPDBUSY status will be returned). There are no real reason for another task with less priority to take the control. The selection of this PDO among all available SRC PDOs is under the SNK responsibility, and is achieved through a DPM callback, called by PE during the Explicit Contract negotiation. ![]() This function (executed on SNK side) aims to identify the PDO within those presented by the SRC, that will match the SNK requirements as much as possible. In Demonstrations code, the current content of USBPDDPMSNKEvaluateCapabilities() code, provides an example of the SNK PDO selection policy, aiming to select the SRC PDO that will provide the maximum power according to the SNK requirements. For example, if application wants to implement its own policy of selection of the SRC PDO to use in the REQUEST message, it could be done in DPMFindVoltageIndex() function.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |