I am using PWM on a Xiao RA4M1 to control a RGB LED. I noticed that certain pins would cause the Xiao to disconnect from the computer when analogWrite was called. I would have to enter the Xiao into Bootloader mode to reconnect.
I used the PWM example from the RA4M1 Multiplexing Guide, https://wiki.seeedstudio.com/xiao_ra4m1_pin_multiplexing/ to check PWM on pins D0-D10.
PWM worked on D0, D5-D10. The issue was present on D1-D4.
The multiplexing guide says, “All GPIO pins on XIAO RA4M1 support PWM output. Therefore, you can use any pin to output PWM to adjust the brightness of lights, control servos, and other functions.”
Why wouldn’t PWM work on D1-D4?
I have a similar issue. Interrupt on pin 0 didn’t work, PWM on pins 3 & 4. Swapped pin 0 to pin 9, pins 3 & 4 to 7 & 8, those work okay.
Weirdly, I used a PRINTLN to serial monitor the pins, and it SAID the PWM on pins 3 & 4 were working as expected, but scoping the physical pins showed them as always low.
Using a PRINTLN to monitor the state of pin 0 showed it was being properly driven, but never triggered the interrupt.
Hi there,
SO the good news is , They are on SALE… CLearence sale…

Cheap!..
HTH
GL
PJ 
probably the least sold unit ever!.
This looks like a board-core or pin-definition issue, rather than a problem with the LED or scope. analogWrite() appears to accept D1-D4, but the timer peripheral may not be correctly routed to those physical pins. The interrupt failure on D0 could have a similar cause: reading the pin state in software does not confirm that its interrupt or PWM peripheral is configured correctly.
For comparison, this PWM LED-fading example shows the expected relationship between analogWrite(), duty cycle, and the physical PWM output.
Since D5-D10 work, using those pins is the practical workaround. I would also install the latest Seeed RA4M1 board package and repeat the test with a minimal sketch. Seeed may need to correct the RA4M1 core mappings or revise the guide, because the statement that every GPIO supports PWM does not match these results.