stm32 which timer and DMA channel should I use?
TIM3_CH2 can be connected to one of two pins: PA7 or PB5. When you select TIM3 &amp; PWM Generation CH2 in CubeMX, it assigns it to PA7. You can CTRL+Click (and hold both) to PA7 and see that PB5 highlighted. Then you can drag &amp; drop it while holding the CTRL key. The black pin means that it's manually assigned and CubeMX won't move it if you try to enable another peripheral which uses the same pin.

If you refer to the Table 78 in the reference manual, you see that DMA1 Channel 3 is shared by TIM3_CH4 and TIM3_UP (update event, basically timer overflow). That's why it's named that way in CubeMX. When a DMA channel is shared by more than one sources, you shouldn't enable more than one at a time.

Update:

After the OP's comment, I realized that I overlooked Table 78. It appears that TIM3_CH2 is unable to make a Capture &amp; Compare DMA request as it's not present in the table.

However, I also realized that what you actually need is a DMA request tied to the update event. This allows you to update CCRx registers every time TIM3 overflows. You can even update all the CCRx registers at once by using the DMA Burst Mode of the timer.

BTW, DMA capabilities are not related to the pins that peripherals use. So, it doesn't matter if it's PA7 or PB5. CubeMX shows TIM3_CH4/UP option because the update event is not related to any timer channel and that DMA request is available even if no CH pin is used.