XIAO NRF52840 - Bluetooth connection disconnects after sending "on" signal

You can find the manual at the following link
Technical Documentation

There are 4 output channels PSEL.OUT(0)-PSEL.OUT(3) for each PWM unit.
See “6.17 PWM - Pulse width modulation Figure 74: PWM module”

There are 4 PWM units, PWM0-3.
See “6.17.5 Registers”.

Assign GPIOs to the 4 output channels of 4 PWM units.
Refer to “6.17.5.23 PSEL.OUT[n] (n=0…3)”.

Up to 16 PWM channels should be available.

The function analogWritte() is written in the following file. The final output is “pwm->write(percent);”.
“C:\Users\UserName\AppData\Local\Arduino15\packages\Seeeduino\hardware\mbed\2.7.2\cores\arduino\wiring_analog.cpp : LINE45 or LINE58”

I am not a software engineer, so this is all I can tell you.

[EDIT] Using “Seeed nRF52 Borads 1.0.0” as the board library, I was able to output PWM on D0-D10 simultaneously.
If you use this board library, you may find my comments in the following link helpful.

1 Like