Re: ATSAMV71 / ATSAMRH71 ethernet POC with RTEMS-LIBBSD
Matthew J Fletcher <[email protected]> Thu, 27 Jun 2024 07:31:54 -0400
| Newsgroups | gmane.os.rtems.user |
|---|---|
| Message-ID | <CAPy9Tin0ha1dXmcsppENR3cMhLHdF3qVBLgDegnyfug_BFfC2Q@mail.gmail.com> |
--===============6460251676251847004== Content-Type: multipart/alternative; boundary="000000000000046b68061bdd7ba3" --000000000000046b68061bdd7ba3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Darius, The if_atsam driver is used extensively on industrial / custom ATSAME71 boards with external SDRAM with LibBSD. The reliability has been very good, you can see in the LibBSD change log for if_atsam some changes a couple of years back that resolved the last issues. regards, Matthew. On Thu, 27 Jun 2024, 05:22 Dariusz Saba=C5=82a, <dariusz.sabala-5+J3KXwDsBirDJvtcaxF/[email protected]= > wrote: > Hi > > I am working on RTEMS LibBSD Ethernet networking POC on ATSAMV71 and on > ATSAMRH71 > > My tries on ATSAMV71 were limited due to very small amount of SDRAM memor= y > on evaluation board - its only 2MB. > > I managed to do the most on SAMRH71F20-EK (CQFP package) evaluation boar= d: > evaluation board is connected to my workstation and I can both ping RH71 > from PC and ping PC from RH71 RTEMS Shell console, it works very well unt= il > random microcontroller freeze. Sometimes program freezes after 20 ping > requests + replies, sometimes after 250, but it always freezes and then > debugging session is broken too, I have to disconnect and attach to see t= he > microcontroller state and it is trapped in endless loop I put in bootload= er > startup code to give me a time to inspect the microcontroller state. > > It might be a misleading clue, but changing GMAC interrupt priority to be > numerically bigger than Systick interrupt makes this stress test to endur= e > more ping requests. > Also an AHB Bus Matrix peripheral of SAMRH71 reports some errors, but I > lack knowledge and documentation on how this certain MCU peripheral (AHB > matrix controller) works. > I doubt it, but SAMRH71F20-EK evaluation board could be a source of > problem too, since it seems they completely ignored hardware design > recommendations of KSZ8061 PHY. > > In order to make if_atsam driver work on ATSAMRH71 I had to: > > - copy and mass sed GMAC driver files, since they changed name of > registers macros a bit > - change pins configuration to reflect which pins are used on my > evalboard > - change "rtems_bsd_if_atsam_get_if_media_props" to return > is_fixed=3Dtrue and duplex=3DIFM_FDX > - change SYSINIT_DRIVER_REFERENCE(ukphy, miibus); to > SYSINIT_DRIVER_REFERENCE(ksz8091rnb, miibus); leaving ukhpy lead to > crashesh after printing long "sssss" strings > > > Please tell me about a maturity and status of ATSAMV71 if_atsam driver, i= s > it tested on any atsamv71 board? Then how, since there is so little memor= y > on Xplained Ultra? > I understand that most of the RTEMS BSP is made only for demonstration > purposes and that's why I'm asking, maybe someone can tell me what should > be changed in it to make it work reliably? Do you have any other resource= s > to suggest I can use to learn how this stack works beside two readme file= s > in rtems-libbsd repo and obviously freebsd documentation? > > Anyway, guys - nice job creating rtems-libbsd. I hope to learn more about > it and use it in our projects. > > Best regards > > Dariusz Saba=C5=82a > Embedded software engineer > Creotech Instruments > _______________________________________________ > users mailing list > [email protected] > http://lists.rtems.org/mailman/listinfo/users --000000000000046b68061bdd7ba3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div>Hi Darius,</div><div dir=3D"auto"><br></div><div dir= =3D"auto">The=C2=A0<span style=3D"font-family:aptos,aptos_embeddedfont,apto= s_msfontservice,calibri,helvetica,sans-serif;font-size:16px">if_atsam drive= r is used extensively on industrial / custom ATSAME71 boards with external = SDRAM with LibBSD. The reliability has been very good, you can see in the L= ibBSD change log for if_atsam some changes a couple of years back that reso= lved the last issues.</span></div><div dir=3D"auto"><span style=3D"font-fam= ily:aptos,aptos_embeddedfont,aptos_msfontservice,calibri,helvetica,sans-ser= if;font-size:16px"><br></span></div><div dir=3D"auto"><span style=3D"font-f= amily:aptos,aptos_embeddedfont,aptos_msfontservice,calibri,helvetica,sans-s= erif;font-size:16px">regards, Matthew.</span></div><div dir=3D"auto"><font = face=3D"aptos, aptos_embeddedfont, aptos_msfontservice, calibri, helvetica,= sans-serif"><span style=3D"font-size:16px"><br></span></font></div><div di= r=3D"auto"><font face=3D"aptos, aptos_embeddedfont, aptos_msfontservice, ca= libri, helvetica, sans-serif"><span style=3D"font-size:16px"><br></span></f= ont><br><div class=3D"gmail_quote" dir=3D"auto"><div dir=3D"ltr" class=3D"g= mail_attr">On Thu, 27 Jun 2024, 05:22 Dariusz Saba=C5=82a, <<a href=3D"m= ailto:dariusz.sabala-5+J3KXwDsBirDJvtcaxF/[email protected]">dariusz.sabala-5+J3KXwDsBirDJvtcaxF/[email protected]</a>> wrote:= <br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bord= er-left:1px #ccc solid;padding-left:1ex"> <div dir=3D"ltr"> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> Hi</div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> <br> </div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> I am working on RTEMS LibBSD Ethernet networking POC on ATSAMV71 and on ATS= AMRH71</div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> <br> </div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> My tries on ATSAMV71 were limited due to very small amount of SDRAM memory = on evaluation board - its only 2MB.</div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> <br> </div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> I managed to do the most on =C2=A0SAMRH71F20-EK (CQFP package) evaluation b= oard:</div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> evaluation board is connected to my workstation and I can both ping RH71 fr= om PC and ping PC from RH71 RTEMS Shell console, it works very well until r= andom microcontroller freeze. Sometimes program freezes after 20 ping reque= sts + replies, sometimes after 250, but it always freezes and then debugging session is broken too, I have to = disconnect and attach to see the microcontroller state and it is trapped in= endless loop I put in bootloader startup code to give me a time to inspect= the microcontroller state.</div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> <br> </div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> It might be a misleading clue, but changing GMAC interrupt priority to be n= umerically bigger than Systick interrupt makes this stress test to endure m= ore ping requests.</div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> Also an AHB Bus Matrix peripheral of SAMRH71 reports some errors, but I lac= k knowledge and documentation on how this certain MCU peripheral (AHB matri= x controller) works.</div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> I doubt it, but SAMRH71F20-EK evaluation board could be a source of problem= too, since it seems they completely ignored hardware design recommendation= s of KSZ8061 PHY.</div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> <br> </div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> In order to make if_atsam driver work on ATSAMRH71 I had to:</div> <ul style=3D"margin-top:0px;margin-bottom:0px"> <li style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calib= ri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);list-style-type:&qu= ot;- ""> <span style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cal= ibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">copy and mass se= d GMAC driver files, since they changed name of registers macros a bit<br> </span></li><li style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontS= ervice,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);list-st= yle-type:"- ""> <span style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cal= ibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">change pins conf= iguration to reflect which pins are used on my evalboard<br> </span></li><li style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontS= ervice,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);list-st= yle-type:"- ""> <span style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cal= ibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">change "rte= ms_bsd_if_atsam_get_if_media_props" to return is_fixed=3Dtrue and dupl= ex=3DIFM_FDX<br> </span></li><li style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontS= ervice,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);list-st= yle-type:"- ""> <span style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cal= ibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">change SYSINIT_D= RIVER_REFERENCE(ukphy, miibus); to SYSINIT_DRIVER_REFERENCE(ksz8091rnb, mii= bus); =C2=A0leaving ukhpy lead to crashesh after printing long "sssss" strings</span></li>= </ul> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> <br> </div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> Please tell me about a maturity and status of ATSAMV71 if_atsam driver, is = it tested on any atsamv71 board? Then how, since there is so little memory = on Xplained Ultra?</div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> I understand that most of the RTEMS BSP is made only for demonstration purp= oses and that's why I'm asking, maybe someone can tell me what shou= ld be changed in it to make it work reliably? Do you have any other resourc= es to suggest I can use to learn how this stack works beside two readme files in rtems-libbsd repo and obviously fre= ebsd documentation?</div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> <br> </div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> Anyway, guys - nice job creating rtems-libbsd. I hope to learn more about i= t and use it in our projects.</div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> <br> </div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> Best regards</div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> <br> </div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> Dariusz Saba=C5=82a</div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> Embedded software engineer=C2=A0</div> <div style=3D"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Cali= bri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> Creotech Instruments</div> <div id=3D"m_-4776152818699575877Signature" style=3D"color:inherit"></div> </div> _______________________________________________<br> users mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank" rel=3D"noreferrer">use= [email protected]</a><br> <a href=3D"http://lists.rtems.org/mailman/listinfo/users" rel=3D"noreferrer= noreferrer" target=3D"_blank">http://lists.rtems.org/mailman/listinfo/user= s</a></blockquote></div></div></div> --000000000000046b68061bdd7ba3-- --===============6460251676251847004== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ users mailing list [email protected] http://lists.rtems.org/mailman/listinfo/users --===============6460251676251847004==--