cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 G071 FRS 功能实现

Hdang.1
Associate

Dear STM32 community,

我在使用G071 MCU模拟PC实现FRS功能时�?�到了问题,我注�?到​STM32Cube_FW_G0\Middlewares\ST\STM32_USBPD_Library\Devices\STM32G0XX\src中的usbpd_hw_if_it.c里有关于UCPD_SR_FRSEVT 中断的内容,但并未完�?FRS的实际动作。

void PORTx_IRQHandler(uint8_t PortNum)
{
	UCPD_TypeDef *hucpd = Ports[PortNum].husbpd;
	uint32_t _interrupt = LL_UCPD_ReadReg(hucpd, SR);
	static uint8_t ovrflag = 0;
 
	............
 
		/* check FRSEVTIE */
		if (_interrupt !=  UCPD_SR_FRSEVT) {
			/* not yet handled */
		}
	}

也就是说,G071在收到远端的FRSEVENT时�?会�?�任何�?作

还请帮忙告诉我,最�?�的FRS事件处�?�大概�?写些什么。我的�?步想法是:

1�?�?�出FRS Message

2�?​切�?�Rp Rd

3�?给Vbus供电

或许,�?�以�??供些FRS示例代�?�?�考�?�。​

​Best regards.

1 REPLY 1
MDU.1
ST Employee

​Hello.

  You find the demo in the STM32G0CUBE library(STM32Cube_FW_G0_V1.3.0\Projects\STM32G081B-EVAL\Demonstrations\DemoUCPD).

if you want change role ,you  refer  "Send_DpmConfigGetCnf" function .

Best Regards

Min