Enable a TIMER with Internal clock and one channel PWM as default mode.
Enable DMA for PWM channel, set Direction Memory to Peripheral, select Increment Memory, set Memory Data Width to Byte, and set Peripheral Data Width to Half-Word.
Select 'Generate peripheral initialization as a pair of .c/.h files per peripheral' on the Code Generator Tab.