Skip to main content
Associate II
December 10, 2024
Question

Implementing FRS on G474

  • December 10, 2024
  • 6 replies
  • 2603 views

Dear ST Community

        I recently purchased two sets of Nucleo-DRP1M1+NucleoG474, and now I want to implement FRS functionality on these two boards. Currently, I have set one of the default power roles to Source, enabled FRS_TX, and the other to Sink. After connecting the two devices together, FRS switching cannot be triggered, and when I was debugging on the Sink side, I found that the FRS interrupt in the code on the Sink side is in a blocked state, and I don't know how to turn it on.

AgoDream_0-1733801876086.png

        Best regards.

AgoDream_0-1733813519613.png

I added the FRS macro definition, but there is a function error inside that I cannot find

This topic has been closed for replies.

6 replies

ST Technical Moderator
December 10, 2024

Hello @AgoDream 

I advise you to follow this article : How to manage fast role swap (FRS) in an STM32 - STMicroelectronics Community

This will help you on the management and implementation of FRS.

 
 
In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
AgoDreamAuthor
Associate II
December 10, 2024

Thank you very much for your reply. I have also carefully read the other article you provided.My DRP_Sink character sent an FR_Swap message, but DRP_Source does not support it.

AgoDream_0-1733820399174.png

The one above is DRP_Sink

AgoDream_0-1733821176020.png

The one above is DRP_Source

 

ST Technical Moderator
December 13, 2024

Hi @AgoDream 

 

Did you check the definition of your PDO in usbpd_pdo_defs.h and in your usbpd_dpm_conf.h

 

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
AgoDreamAuthor
Associate II
December 13, 2024

AgoDream_0-1734081234617.png

Hello, I have checked the definition of PDO and it supports FRS. My code was directly generated using STM32CubeMX

ST Technical Moderator
December 13, 2024

Would you share your IOC file?

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
AgoDreamAuthor
Associate II
December 13, 2024

Thank you,This is my IOC file.