ATSAMV71 / ATSAMRH71 ethernet POC with RTEMS-LIBBSD

Dariusz Sabała dariusz.sabala at creotech.pl
Thu Jun 27 09:22:11 UTC 2024


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 memory on evaluation board - its only 2MB.

I managed to do the most on  SAMRH71F20-EK (CQFP package) evaluation board:
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 until 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 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.

It might be a misleading clue, but changing GMAC interrupt priority to be numerically bigger than Systick interrupt makes this stress test to endure 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=true and duplex=IFM_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, is it tested on any atsamv71 board? Then how, since there is so little memory 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 resources to suggest I can use to learn how this stack works beside two readme files 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ła
Embedded software engineer
Creotech Instruments
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20240627/e1c13032/attachment.htm>


More information about the users mailing list