cancel
Showing results for 
Search instead for 
Did you mean: 

VCONN_SUPPORT

TSaku.2135
Associate II

I would like to enable VCONN based on STM32CubeExpansion_USBPD_F0_V2.1.0.

I found CMACRO "_VCONN_SUPPORT", but I encountered complile errors below if I used _VCONN_SUPPORT.

compiling usbpd_dpm_core.c...

../../../../../../Middlewares/ST/STM32_USBPD_Library/Core/src/usbpd_dpm_core.c(191): error: #20: identifier "USBPD_DPM_EvaluateVconnSwap" is undefined

   USBPD_DPM_EvaluateVconnSwap,

../../../../../../Middlewares/ST/STM32_USBPD_Library/Core/src/usbpd_dpm_core.c(192): error: #20: identifier "USBPD_DPM_PE_VconnPwr" is undefined

   USBPD_DPM_PE_VconnPwr,

../../../../../../Middlewares/ST/STM32_USBPD_Library/Core/src/usbpd_dpm_core.c: 0 warnings, 2 errors

I think I should write these functions in my user code, but I would like to see sample code of these functions.

Please advice.

1 ACCEPTED SOLUTION

Accepted Solutions

Hello

Please find an update of the project in enabling switch '_VCONN_SUPPORT'.

Thanks to this application, you should see communications with cable.

On my EVAL_FUSB307 board, I changed the jumper JP2 to connect VCONN directly to 5.0V.

For your information, on this FW package, cable information will transit to application thanks to callback 'USBPD_DPM_SetDataInfo' with DataID=USBPD_CORE_IDENTITIY_SOP1:

/**
  * @brief  DPM callback to allow PE to update information in DPM/PWR_IF.
  * @param  PortNum Port number
  * @param  DataId  Type of data to be updated in DPM based on @ref USBPD_CORE_DataInfoType_TypeDef
  * @param  Size    Nb of bytes to be updated in DPM
  * @retval None
  */
void USBPD_DPM_SetDataInfo(uint8_t PortNum, USBPD_CORE_DataInfoType_TypeDef DataId, uint32_t *Ptr, uint32_t Size)
{
  uint32_t index;
 
  /* Check type of information targeted by request */
  switch (DataId)
  {
(...)
    case USBPD_CORE_IDENTITIY_SOP1 :
      {
        uint8_t*  disco_ident;
        disco_ident = (uint8_t*)&DPM_Ports[PortNum].VDM_DiscoCableIdentify;
        memcpy(disco_ident, (uint8_t*)Ptr, sizeof(USBPD_DiscoveryIdentity_TypeDef));
      break;
      }

View solution in original post

4 REPLIES 4
Yohann M.
ST Employee

Dear @TSaku.2135​  😉

We did not deliver VCONN applications on X-CUBE AFE solution. This solution is no more supported for P-NUCLEO-USB001.

In addition to this solution, we have introduced traditional STM32 MCUs with native hardware interface (called UCPD) to support USB-C and Power Delivery Technology.

This solution �?� described below, is available in STM32G0, STM32G4 and STM32L5 product families.

It comes with a complete ecosystem (such as a discovery kit and a debugging tool) that simplifies UCPD configuration and use.

USB PD middleware stack is now part of STM32Cube (so X-CUBE-USB-PD expansion pack is not needed anymore when this solution is selected)

To make this new solution even more attractive a companion Type-C Port Protection (TCPP01-M12) is available to protect the CC lines against ESD and short to VBus.

0690X00000AtNJLQA3.jpg

Further information on that new offer are available here after.

  • STM32G0 USB-C marketing presentation : link
  • Getting started video with USB type-C and STM32G0 ecosystem : link
  • Create a USB Power Delivery sink application in less than 10’ : link
  • STM32G0 series : link
  • STM32G071B-Disco data brief : link
  • STM32G071B-Disco User manual : link
  • STM32CubemonUCPD (USB PD Software debugging tool): link
  • STM32G0 Online Training : link and a specific training on STM32G0 UCPD interface here
  • Specific Application Note AN5225.

Anyway, you will find in EVAL-G0 demonstrations code ('.\Projects\STM32G081B-EVAL\Demonstrations\DemoUCPD\') the way to manage VCONN in the FW package.

Regards,

Yohann

Dear Yohann M,

Thank you for prompt answers.

I am using TCPM/TCPC configuration with ON-FUSB3-STM32 board. Is that possible to enable VCONN ?

Hello

Please find an update of the project in enabling switch '_VCONN_SUPPORT'.

Thanks to this application, you should see communications with cable.

On my EVAL_FUSB307 board, I changed the jumper JP2 to connect VCONN directly to 5.0V.

For your information, on this FW package, cable information will transit to application thanks to callback 'USBPD_DPM_SetDataInfo' with DataID=USBPD_CORE_IDENTITIY_SOP1:

/**
  * @brief  DPM callback to allow PE to update information in DPM/PWR_IF.
  * @param  PortNum Port number
  * @param  DataId  Type of data to be updated in DPM based on @ref USBPD_CORE_DataInfoType_TypeDef
  * @param  Size    Nb of bytes to be updated in DPM
  * @retval None
  */
void USBPD_DPM_SetDataInfo(uint8_t PortNum, USBPD_CORE_DataInfoType_TypeDef DataId, uint32_t *Ptr, uint32_t Size)
{
  uint32_t index;
 
  /* Check type of information targeted by request */
  switch (DataId)
  {
(...)
    case USBPD_CORE_IDENTITIY_SOP1 :
      {
        uint8_t*  disco_ident;
        disco_ident = (uint8_t*)&DPM_Ports[PortNum].VDM_DiscoCableIdentify;
        memcpy(disco_ident, (uint8_t*)Ptr, sizeof(USBPD_DiscoveryIdentity_TypeDef));
      break;
      }

Dear Yohann M,

Thank you for geast support..

I have comfirmed VCONN is working now !