PWM of a solitary LED

On my board I have an LED, which I can easily turn on and off via the TS code or block for it. But I need to be able to dim the LED using PWM. On the RP2040, all GPIOs are capable of PWM.

Yet when I try AnalogWrite for the LED pin the editor barfs.

Is there something I need to modify in order to support PWM on the LED pin?

It is NOT an APA102 or WS2812 etc. It’s just a plain ol’ LED on a common drain MOSFET controlled by a GPIO pin.

I’ve seen people on YT doing this with regular “Dxx” outputs pins. I’ve configured the P_10 (GPIO10) of the RP2040 on my board to be PIN_LED, as well as P10, and D10.

When using “LED” in Arcade, I can turn it on and off, and CODAL will flash the LED if I precipitate any configuration errors.

When I removed the PIN_LED from my config and just left it as PIN_D10, and use the AnalogWrite and AnalogWritePeriod functions, it never lights at all… no matter what the period or PWM level I plug in.

Is there some other configuration compatibility issue?

This also raises another question which the configuration documents do not document: What is allowed when it comes to applying multiple possible configurations to a single device pin?

These might also be questions for @mmoskal

I appreciate the help. Just need more info about the bounds within which I need to work.