Solved: Re: Phc2sys Waiting For Ptp4l... - NXP Community

NXP Community
  • Forums 5
    • Product Forums 25
      • General Purpose MicrocontrollersGeneral Purpose Microcontrollers
      • i.MX Forumsi.MX Forums
      • QorIQ Processing PlatformsQorIQ Processing Platforms
      • Identification and SecurityIdentification and Security
      • Power ManagementPower Management
      • Wireless ConnectivityWireless Connectivity
      • RFID / NFCRFID / NFC
      • Advanced AnalogAdvanced Analog
      • MCX Microcontrollers
      • S32G
      • S32K
      • S32V
      • MPC5xxx
      • Other NXP Products
      • S12 / MagniV Microcontrollers
      • Powertrain and Electrification Analog Drivers
      • Sensors
      • Vybrid Processors
      • Digital Signal Controllers
      • 8-bit Microcontrollers
      • ColdFire/68K Microcontrollers and Processors
      • PowerQUICC Processors
      • OSBDM and TBDML
      • S32M
      • S32Z/E
    • Solution Forums 4
      • Smart Home
      • Power & Energy
      • Mobile Robotics
      • Motor Control
    • Software Forums 16
      • MCUXpresso Software and ToolsMCUXpresso Software and Tools
      • CodeWarriorCodeWarrior
      • MQX Software SolutionsMQX Software Solutions
      • Model-Based Design Toolbox (MBDT)Model-Based Design Toolbox (MBDT)
      • FreeMASTER
      • eIQ Machine Learning Software
      • Embedded Software and Tools Clinic
      • S32 SDK
      • S32 Design Studio
      • GUI Guider
      • Zephyr Project
      • Voice Technology
      • Application Software Packs
      • Secure Provisioning SDK (SPSDK)
      • Processor Expert Software
      • Generative AI & LLMs
    • Topics 8
      • Mobile Robotics - Drones and RoversMobile Robotics - Drones and Rovers
      • NXP Training ContentNXP Training Content
      • University ProgramsUniversity Programs
      • Rapid IoT
      • NXP Designs
      • SafeAssure-Community
      • OSS Security & Maintenance
      • Using Our Community
    • Cloud Lab Forums 2
      • Hardware
      • Cloud Lab Knowledge Base
  • Knowledge Bases 21
    • ARM Microcontrollers 7
      • K32 L Series Microcontrollers Knowledge Base
      • Kinetis Microcontrollers Knowledge Base
      • Kinetis Motor Suite Knowledge Base
      • LPC FAQs Knowledge Base
      • LPC Microcontrollers Knowledge Base
      • LPCware Archive Content
      • MCX Microcontrollers Knowledge Base
    • i.MX Processors 5
      • i.MX RT Crossover MCUs Knowledge Base
      • i.MX Graphics Knowledge Base
      • i.MX Processors Knowledge Base
      • i.MX Solutions Knowledge Base
      • i.MX 한국어 커뮤니티 Knowledge Base
    • Identification and Security 3
      • EdgeLock 2GO Secure Service Knowledge Base
      • Secure Authentication Knowledge Base
      • Smart Cards and Secure Element Knowledge Base
    • Model-Based Design Toolbox (MBDT) 0
    • QorIQ Processing Platforms 0
    • S32 Automotive Processing Platform 0
    • Wireless Connectivity 3
      • Other Connectivity Knowledge Base
      • Wi-Fi® + Bluetooth® + 802.15.4 Knowledge Base
      • Wireless Connectivity Knowledge Base
    • CodeWarrior 0
    • MCUXpresso Suite of Software and Tools 0
    • MQX Software Solutions 0
    • RFID / NFC 0
    • Advanced Analog 2
      • High Performance Analog Front End Interfaces
      • In Vehicle Networking
    • 8-bit Microcontrollers Knowledge Base
    • Motor Control and Smart Energy Knowledge Base
    • Power Management Knowledge Base
    • FRDM Training Hub
    • MCUXpresso Training Hub
    • Zephyr Project Knowledge Base
    • Generative AI & LLMs Knowledge Base
    • Embedded World NXP Connectivity Workshop Knowledge Base
    • Hands-on workshop in Japan (ハンズオン・ワークショップ [日本]) Knowledge Base
  • NXP Tech Blogs 1
    • NXP Tech Blog
  • Ideas
  • Blogs
  • Forums
  • Knowledge Bases
  • NXP Tech Blogs
  • NXP.COM
Sign In FAQs Language English (US) 日本語 | Japanese 中文 | Chinese (Simplified)
  • Home
  • QorIQ Processing Platforms
  • Layerscape
  • Re: phc2sys Waiting for ptp4l...
phc2sys Waiting for ptp4l... All communityThis categoryThis boardKnowledge baseUsersProducts cancel Turn on suggestions Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type. Showing results for  Show  only  | Search instead for  Did you mean:  Options SOLVED Jump to solution

phc2sys Waiting for ptp4l...

Jump to solution ‎03-23-2022 10:22 PM 12,782 Views deepanrajanbara deepanrajanbara Contributor IV

Hi,

We are using ptp4l in our Ls1046a based custom board and it is able to run in our system and the 1588 pulse is in sync with the system. But when we run phc2sys -s fm1-mac3 -w command for the clock to get the UTC offset from the ptp4l automatically. we are observing "Waiting for ptp4l..." log continuously. the phc2sys is stuck in this state for long time. please help us resolve this issue.

Thank you,

Deepanraj.A

Solved! Go to Solution.

0 Kudos Reply 1 Solution Jump to solution ‎03-31-2022 03:11 AM 12,720 Views yipingwang NXP TechSupport yipingwang NXP TechSupport The config file is from upstream linuxptp git repo: git://git.code.sf.net/p/linuxptp/code $ ls configs/ automotive-master.cfg default.cfg G.8265.1.cfg G.8275.2.cfg P2P-TC.cfg ts2phc-generic.cfg UNICAST-MASTER.cfg automotive-slave.cfg E2E-TC.cfg G.8275.1.cfg gPTP.cfg snmpd.conf ts2phc-TC.cfg UNICAST-SLAVE.cfg

View solution in original post

0 Kudos Reply
  • All forum topics
  • Previous Topic
  • Next Topic
5 Replies Jump to solution ‎03-28-2022 08:37 PM 12,757 Views yipingwang NXP TechSupport yipingwang NXP TechSupport

I cannot reproduce your issue, when you observe this issue, could you please check ptp4l is running correctly and keeps synchronizing with master?

Following is my testing log for your reference:

// console1: run ptp4l first to sync your 1588 clock to master # root@ls1046ardb:~/linuxptp# ./ptp4l -i fm1-mac3 -s -m ...

ptp4l[1382.218]: master offset -8 s2 freq +16086 path delay 1810

ptp4l[1383.218]: master offset 25 s2 freq +16116 path delay 1809

ptp4l[1384.218]: master offset -21 s2 freq +16078 path delay 1809

ptp4l[1385.218]: master offset 3 s2 freq +16096 path delay 1809

ptp4l[1386.218]: master offset 3 s2 freq +16096 path delay 1809

ptp4l[1387.218]: master offset -5 s2 freq +16089 path delay 1809

// console2: then run phy2sys to sync system clock to 1588 clock root@ls1046ardb:~/linuxptp# ./phc2sys -s fm1-mac3 -w -m ...

phc2sys[1210.948]: CLOCK_REALTIME phc offset -33 s2 freq +16135 delay 400

phc2sys[1211.948]: CLOCK_REALTIME phc offset -34 s2 freq +16124 delay 440

phc2sys[1212.948]: CLOCK_REALTIME phc offset -38 s2 freq +16110 delay 440

phc2sys[1213.948]: CLOCK_REALTIME phc offset -8 s2 freq +16129 delay 440

phc2sys[1214.948]: CLOCK_REALTIME phc offset -11 s2 freq +16123 delay 440

phc2sys[1215.949]: CLOCK_REALTIME phc offset 8 s2 freq +16139 delay 400

phc2sys[1216.949]: CLOCK_REALTIME phc offset -15 s2 freq +16118 delay 400

0 Kudos Reply Jump to solution ‎03-29-2022 05:32 AM 12,749 Views deepanrajanbara deepanrajanbara Contributor IV

Hi

We are actually using g.8275.1 profile and when we run ptp4l we are not getting any isseue. But when we run phc2sys with -w option we are observing waiting for ptp4l . Please let us know, Do we need to do any configuration in ptp4l so that it will be in sync with the phc2sys

0 Kudos Reply Jump to solution ‎03-30-2022 07:20 PM 12,736 Views yipingwang NXP TechSupport yipingwang NXP TechSupport

please find the testing log for g.8275.1 profile

//master

root@ls1046ardb:~/linuxptp# ./ptp4l -i fm1-mac3 -f configs/G.8275.1.cfg -m

ptp4l[35564.353]: selected /dev/ptp0 as PTP clock

ptp4l[35564.384]: port 1 (fm1-mac3): INITIALIZING to LISTENING on INIT_COMPLETE

ptp4l[35564.384]: port 0 (/var/run/ptp4l): INITIALIZING to LISTENING on INIT_COMPLETE

ptp4l[35564.384]: port 0 (/var/run/ptp4lro): INITIALIZING to LISTENING on INIT_COMPLETE

ptp4l[35564.867]: port 1 (fm1-mac3): LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES

ptp4l[35564.867]: selected local clock 00e00c.fffe.001000 as best master

ptp4l[35564.867]: port 1 (fm1-mac3): assuming the grand master role

//slave console 1 for ptp4l

root@localhost:~/linuxptp# ./ptp4l -i fm1-mac3 -f configs/G.8275.1.cfg -m ...

ptp4l[34959.195]: rms 5 max 10 freq -3067 +/- 8 delay 1296 +/- 1

ptp4l[34960.195]: rms 4 max 8 freq -3064 +/- 7 delay 1298 +/- 1

ptp4l[34961.196]: rms 7 max 16 freq -3078 +/- 9 delay 1300 +/- 2

ptp4l[34962.196]: rms 5 max 10 freq -3071 +/- 9 delay 1296 +/- 1

ptp4l[34963.196]: rms 9 max 15 freq -3059 +/- 12 delay 1300 +/- 1

//slave console2 for phy2sys

root@localhost:~/linuxptp# ./phc2sys -s fm1-mac3 -w -n 24 -m ...

phc2sys[35008.855]: CLOCK_REALTIME phc offset -139 s2 freq -3145 delay 440

phc2sys[35009.855]: CLOCK_REALTIME phc offset -54 s2 freq -3102 delay 400

phc2sys[35010.855]: CLOCK_REALTIME phc offset -12 s2 freq -3076 delay 400

phc2sys[35011.855]: CLOCK_REALTIME phc offset -16 s2 freq -3083 delay 440

phc2sys[35012.856]: CLOCK_REALTIME phc offset 6 s2 freq -3066 delay 400

phc2sys[35013.856]: CLOCK_REALTIME phc offset -17 s2 freq -3087 delay 440

phc2sys[35014.856]: CLOCK_REALTIME phc offset 7 s2 freq -3069 delay 440

0 Kudos Reply Jump to solution ‎03-30-2022 09:02 PM 12,730 Views deepanrajanbara deepanrajanbara Contributor IV

Hi ,

Can you please share your config file so that we can also test with the same config file .

Thank you,

Deepanraj.A

0 Kudos Reply Jump to solution ‎03-31-2022 03:11 AM 12,721 Views yipingwang NXP TechSupport yipingwang NXP TechSupport The config file is from upstream linuxptp git repo: git://git.code.sf.net/p/linuxptp/code $ ls configs/ automotive-master.cfg default.cfg G.8265.1.cfg G.8275.2.cfg P2P-TC.cfg ts2phc-generic.cfg UNICAST-MASTER.cfg automotive-slave.cfg E2E-TC.cfg G.8275.1.cfg gPTP.cfg snmpd.conf ts2phc-TC.cfg UNICAST-SLAVE.cfg 0 Kudos Reply Post Reply ' var data = div.getElementsByClassName("video-js"); var script = document.createElement('script'); script.src = "https://players.brightcove.net/" + data_account + "/" + data_palyer + "_default/index.min.js"; for(var i=0;i< data.length;i++){ videodata.push(data[i]); } } } for(var i=0;i< videodata.length;i++){ document.getElementsByClassName('lia-vid-container')[i].innerHTML = videodata[i].outerHTML; document.body.appendChild(script); } } catch(e){ } /* Re compile html */ $compile(rootElement.querySelectorAll('div.lia-message-body-content')[0])($scope); } if (code_l.toLowerCase() != newBody.getAttribute("slang").toLowerCase()) { /* Adding Translation flag */ var tr_obj = $filter('filter')($scope.sourceLangList, function (obj_l) { return obj_l.code.toLowerCase() === newBody.getAttribute("slang").toLowerCase() }); if (tr_obj.length > 0) { tr_text = "This content was translated from lilicon-trans-text using AI-assisted tools.".replace(/lilicon-trans-text/g, tr_obj[0].title); tr_text +='View original'; try { if ($scope.wootMessages[$rootScope.profLang] != undefined) { tr_text = $scope.wootMessages[$rootScope.profLang].replace(/lilicon-trans-text/g, tr_obj[0].title); tr_text +='View original'; } } catch (e) { } } else { //tr_text = "This message was translated for your convenience!"; tr_text = "lilicon-trans.your.convenience"; } try { if (!document.getElementById("tr-msz-" + value)) { var tr_para = document.createElement("P"); tr_para.setAttribute("id", "tr-msz-" + value); tr_para.setAttribute("class", "tr-msz"); tr_para.style.textAlign = 'justify'; var tr_fTag = document.createElement("IMG"); tr_fTag.setAttribute("class", "tFlag"); tr_fTag.setAttribute("alt", "Translate icon"); // tr_fTag.setAttribute("title", "Disclaimer for Translate icon"); tr_fTag.setAttribute("src", "/html/assets/translate-icon.svg"); tr_para.appendChild(tr_fTag); var container = document.createElement('span'); container.innerHTML = tr_text; //var tr_textNode = document.createTextNode(container); tr_para.appendChild(container); /* Woot message only for multi source */ if(rootElement.querySelector(".lia-message-body-content").previousElementSibling != null && rootElement.querySelector(".lia-message-body-content").previousElementSibling.getAttributeNames().includes("data-generation-timestamp")){ rootElement.querySelector(".lia-message-body-content").previousElementSibling.remove() } if(rootElement.querySelector(".lia-quilt-forum-message")){ rootElement.querySelector(".lia-quilt-forum-message .lia-message-body").insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector(".lia-message-view-blog-topic-message")) { rootElement.querySelector(".lia-message-view-blog-topic-message .lia-message-body").insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector(".lia-quilt-blog-reply-message")){ rootElement.querySelector(".lia-quilt-blog-reply-message .lia-message-body").insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector(".lia-quilt-tkb-message")){ rootElement.querySelectorAll(".lia-quilt-tkb-message .lia-message-body")[0].insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector(".lia-quilt-tkb-reply-message")){ rootElement.querySelectorAll(".lia-quilt-tkb-reply-message .lia-message-body")[0].insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector(".lia-quilt-idea-message")){ rootElement.querySelector(".lia-quilt-idea-message .lia-message-body").insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector(".lia-quilt-idea-reply-message")){ rootElement.querySelector(".lia-quilt-idea-reply-message .lia-message-body").insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else if(rootElement.querySelector('.lia-quilt-occasion-message')){ rootElement.querySelector('.lia-quilt-occasion-message .lia-message-body').insertBefore(tr_para,rootElement.querySelector(".lia-message-body-content")); } else { if (rootElement.querySelectorAll('div.lia-quilt-row-footer').length > 0) { rootElement.querySelectorAll('div.lia-quilt-row-footer')[0].appendChild(tr_para); } else { rootElement.querySelectorAll('div.lia-quilt-column-message-footer')[0].appendChild(tr_para); } } } } catch (e) { } } } else { /* Do not display button for same language */ // syncList.remove(value); var index = $scope.syncList.indexOf(value); if (index > -1) { $scope.syncList.splice(index, 1); } } } } } } /*if(mszList_l.length { var mszListl = []; angular.forEach(document.querySelectorAll("[class*='lia-js-data-messageUid']"), function(element) { var mszId = element.getAttribute("data-lia-message-uid"); if (mszId != null) { mszListl.push(mszId); } }); var mszListid = mszListl; console.log("mszListl:",mszListl); },2000) }else{ var mszListid = mszList_l; }*/ console.log("mszList_l:",mszList_l.length); angular.forEach(mszList_l, function (value) { if (document.querySelectorAll('div.lia-js-data-messageUid-' + value).length > 0) { var rootElements = document.querySelectorAll('div.lia-js-data-messageUid-' + value); }else if(document.querySelectorAll('.lia-occasion-message-view .lia-component-occasion-message-view').length >0){ var rootElements = document.querySelectorAll('.lia-occasion-message-view .lia-component-occasion-message-view')[0].querySelectorAll('.lia-occasion-description')[0]; }else { var rootElements = document.querySelectorAll('div.message-uid-' + value); } angular.forEach(rootElements, function (rootElement) { if (value == '1433168' && "ForumTopicPage" == "TkbArticlePage") { rootElement = document.querySelector('.lia-thread-topic'); } /* V1.1 Remove from UI */ if (document.getElementById("tr-msz-" + value)) { document.getElementById("tr-msz-" + value).remove(); } if (document.getElementById("tr-sync-" + value)) { document.getElementById("tr-sync-" + value).remove(); } /* XPath expression for subject and Body */ var lingoRBExp = "//lingo-body[@id = "+"'lingo-body-"+value+"'"+"]"; lingoRSExp = "//lingo-sub[@id = "+"'lingo-sub-"+value+"'"+"]"; /* Get translated subject of the message */ lingoRSXML = doc.evaluate(lingoRSExp, doc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); for(var i=0;i 0){ angular.forEach(document.querySelectorAll(".PageTitle"), function(subEle) { subEle.textContent = sub_L; }); } } } // Label translation try{ var labelEle = document.querySelector("#labelsForMessage"); if(!labelEle){ labelEle = document.querySelector(".LabelsList"); } if(labelEle) { var listContains = labelEle.querySelector('.label'); if (listContains) { /* Commenting this code as bussiness want to point search with source language label */ // var tagHLink = labelEle.querySelectorAll(".label")[0].querySelector(".label-link").href.split("label-name")[0]; var lingoLabelExp = "//lingo-label/text()"; trLabels = []; trLabelsHtml = ""; /* Get translated labels of the message */ lingoLXML = doc.evaluate(lingoLabelExp, doc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); var labelsLength = document.querySelector(".LabelsList").querySelectorAll(".label").length; var labelSnapshotLength = lingoLXML.snapshotLength; if (labelsLength == labelSnapshotLength){ for (var k = 0; k < lingoLXML.snapshotLength; k++) { //trLabels.push(lingoLXML.snapshotItem(i).textContent); if (k != 0) { //trLabelsHtml = trLabelsHtml + '
  • ,
  • '; //diffVariable = kValue } try{ if(labelEle.querySelectorAll(".label")[k]){ tagHLink = labelEle.querySelectorAll(".label")[k].querySelector(".label-link").href; if ("ForumTopicPage" == "BlogArticlePage") { trLabelsHtml = trLabelsHtml + '
  • ' + lingoLXML.snapshotItem(k).textContent + '
  • '; } else { // trLabelsHtml = trLabelsHtml + '
  • ' + lingoLXML.snapshotItem(k).textContent + '

  • '; trLabelsHtml = trLabelsHtml + '
  • ' + lingoLXML.snapshotItem(k).textContent + '
  • '; } } } catch(e){ } } } if (newSub.getAttribute("slang").toLowerCase() != code_l.toLowerCase()) { if (trLabelsHtml != "") { var labelSname = ""; if(labelEle.querySelector("ul li:nth-child(1)").getAttribute("aria-hidden")){ labelSname = labelEle.querySelector("ul li:nth-child(1)").outerHTML; } labelEle.querySelector("ul").innerHTML = ""; labelEle.querySelector("ul").innerHTML = labelSname + trLabelsHtml; } } } } } catch(e){ } } } /* V 2.0:3 = Store not translated reply id */ if(lingoRSXML.snapshotLength == 0){ if($scope.falseReplyID == "") { $.ajax({ url : "/api/2.0/search?q=select id,c_unsupported_language from messages where id ='"+value+"'", method:"GET", success : function(data){ console.log("Success :",data.data.items[0]); if(!data.data.items[0].c_unsupported_language){ console.log("false reply id:",value); $scope.falseReplyID = value; } }, error : function(data){ console.log("error",data); } }); } } /* Get translated Body of Replies/Comments */ var lingoRBXML = doc.evaluate(lingoRBExp, doc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); for(var i=0;i 0) { var attachDiv = rootElement.querySelector('div.lia-quilt-row-main').querySelector('div.custom-attachments'); if (attachDiv) { attachDiv = attachDiv.outerHTML; }else if(rootElement.querySelector('div.lia-quilt-row-main').querySelectorAll('#attachments').length > 0){ if ("ForumTopicPage" == "BlogArticlePage") { attachDiv = rootElement.querySelector('div.lia-quilt-row-main .lia-message-body-content').querySelector('#attachments'); if (attachDiv) { attachDiv = attachDiv.outerHTML; } else{ attachDiv = ""; } }else{ attachDiv = rootElement.querySelector('div.lia-quilt-row-main').querySelector('#attachments').outerHTML; } } else { attachDiv = ""; } /* Feedback Div */ var feedbackDiv = ""; var feedbackDivs = rootElement.querySelector('div.lia-quilt-row-main').querySelectorAll('div.lia-panel-feedback-banner-safe'); if (feedbackDivs.length > 0) { for (var k = 0; k < feedbackDivs.length; k++) { feedbackDiv = feedbackDiv + feedbackDivs[k].outerHTML; } } }else { var attachDiv = rootElement.querySelector('div.lia-message-body-content').querySelector('div.Attachments.preview-attachments'); if (attachDiv) { attachDiv = attachDiv.outerHTML; } else { attachDiv = ""; } /* Everyone tags links */ if (document.querySelectorAll("div.TagList").length > 0){ var everyoneTagslink = document.querySelector('div.lia-quilt-row-main').querySelector(".MessageTagsTaplet .TagList"); if ((everyoneTagslink != null)||(everyoneTagslink != undefined)){ everyoneTagslink = everyoneTagslink.outerHTML; } else{ everyoneTagslink = ""; } } /* Feedback Div */ var feedbackDiv = ""; var feedbackDivs = rootElement.querySelector('div.lia-message-body-content').querySelectorAll('div.lia-panel-feedback-banner-safe'); if (feedbackDivs.length > 0) { for (var m = 0; m < feedbackDivs.length; m++) { feedbackDiv = feedbackDiv + feedbackDivs[m].outerHTML; } } } } } catch (e) { } if (body_L == "") { /* V 2.0:7 Replacing translated video data with source video data */ var newBodyVideoData = newBody.querySelectorAll('div[class*="vid-container"]'); angular.forEach($scope.videoData[value], function (sourceVideoElement, index) { if (index

    Từ khóa » G.8275.2.cfg