@EpicZero - Let me try an explanation. Timers are very flexible, so I will focus on the 'core', and accept that it is only a subset of the picture. So you might need to ask some more questions.
A timer is the 'whole enchilada' - it is the subject of a chapter in RM008.
There are several variations, with some extra features, so lets concentrate on the General purpose timers TIM2 to TIM5. The other General purpose timers are variations on those.
At it's core, a TIM2-TIM5 timer is one counter and four channels. (There is more logic around it, but let's go with this first.)
The counter is driven to count up, down, or up and down. It is the hardware equivalent of for (uint16 i=0; i<overflow; i++)
To make the waveform generated for PWM symmetrical (which is a 'good thing'), the counter counts up, then down, then up, then down, ....
Each channel can behave as an input or an output. Let's focus on output because that is how PWM signals are created.
In TIM2 to TIM5, each channel drives one output pin (this actually depends on the integrated circuit package, some packages don't have enough pins, so the designers decided not to connect all channels to the outside world).
The state of the channel's output pin changes when the channel 'match value' equals the timer's counter value. So a channel is like an if
test, which changes the state of the pin.
So a timer looks like this (in PWM modes):
while (1) {
for (int counter=0; counter<overflow; ++counter) {
if (channel1.match == counter) {
channel1.pin = ! channel1.pin;
}
if (channel2.match == counter) {
channel2.pin = ! channel2.pin;
}
if (channel3.match == counter) {
channel3.pin = ! channel3.pin;
}
if (channel4.match == counter) {
channel4.pin = ! channel4.pin;
}
}
for (int counter=overflow; counter>0; --counter) {
if (channel1.match == counter) {
channel1.pin = ! channel1.pin;
}
if (channel2.match == counter) {
channel2.pin = ! channel2.pin;
}
if (channel3.match == counter) {
channel3.pin = ! channel3.pin;
}
if (channel4.match == counter) {
channel4.pin = ! channel4.pin;
}
}
}
The expression channel.pin = ! channel.pin
represents the pin toggling between high, then low, then high, ...
So a timer is all of that, and more.
2. It actually doesn't matter if two DC motors are on the same timer. All Maple TIM2-TIM5 timers are initialised to the same frequency, so when you are beginning, it doesn't matter.
In general DC motors will be on different channels because you'll want to drive them at different speeds (and it is virtually impossible to drive ordinary DC Motors at the same speed from one PWM signal. Manufacturing tolerances are too wide to enable that)
3. What are you planning to put on the Rx/Tx pins? If it is a UART (e.g. normal asynchronous communication) it doesn't use the CLK pin.