21ic问答首页 - 关于启动PTP时间戳功能后,网络就ping不通了的问题
关于启动PTP时间戳功能后,网络就ping不通了的问题
原先网络都能够ping通,但起用了下面代码后,网络就ping不通了。NewState为ENABLEvoid ETH_PTPTimeStampCmd(FunctionalState NewState){
/* Check the parameters */
assert_param(IS_FUNCTIONAL_STATE(NewState));
if (NewState != DISABLE)
{
/* Enable the PTP time stamp for transmit and receive frames */
ETH->PTPTSCR |= ETH_PTPTSCR_TSE;
}
else
{
/* Disable the PTP time stamp for transmit and receive frames */
ETH->PTPTSCR &= (~(uint32_t)ETH_PTPTSCR_TSE);
}
}
/* Check the parameters */
assert_param(IS_FUNCTIONAL_STATE(NewState));
if (NewState != DISABLE)
{
/* Enable the PTP time stamp for transmit and receive frames */
ETH->PTPTSCR |= ETH_PTPTSCR_TSE;
}
else
{
/* Disable the PTP time stamp for transmit and receive frames */
ETH->PTPTSCR &= (~(uint32_t)ETH_PTPTSCR_TSE);
}
}
赞0
评论
2023-11-13
您需要登录后才可以回复 登录 | 注册