Pin 13 PWM

According to the arduino docs, Pin 13 can be used as PWM, however, analogWrite will not produce PWM on 13, but will for any other pins. I have tried a custom zero board and the CC zero board. Is there something I am missing?

EDIT: I’m guessing it has something to do with it being the LED pin.

In variant.cpp file, replace the line

 -  { PORTA, 17, PIO_PWM, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), No_ADC_Channel, PWM2_CH1, NOT_ON_TIMER, EXTERNAL_INT_1 }, // TCC2/WO[1]

with

 +  { PORTA, 17, PIO_PWM, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM|PIN_ATTR_TIMER), No_ADC_Channel, PWM2_CH1, TCC2_CH1, EXTERNAL_INT_1 }, // TCC2/WO[1]

The variant file is in Arduino15/packages/arduino/hardware/samd/1.6.x/variants/arduino_zero. Arduino15 directory is in User\AppData\Local\ (windows), and User/Library on Mac.

It looks like that worked, thank you!