ItsyBitsy M4 Express (ATSAMD51 ) PWM and SPI / Ethernet (W5500) problems

Hi qniens,

But when I'm receiving data on the UDP port the Arduino runs for a couple of seconds and then stops/crashes. When not receiving data on the UDP port the Arduino runs fine. If you comment out all the PWM code the Ethernet code runs without problems.

The SAMD51's TCx and TCCx timer peripherals run completely autonomously and independently from the CPU.

I suspect the issue has more to do with the delay(500) functions. What happens if you comment out the delay(500) functions, but retain the writes to the TCC0's CC0 register, does the Ethernet code still function correctly?