I recently got this micro controller: STM32F103C8T6. It says:

"The advanced-control timer (TIM1) can be seen as a three-phase PWM multiplexed on 6 channels. It has complementary PWM outputs with programmable inserted dead-times"

This is exactly what i'm looking for, but i'm confused on how I actually go about programming this? I read through almost the entire datasheet and the only thing it shows is the pin out and description table with the name "TIM1_CH1N, TIM1_CH2N, TIM1_CH3N, TIM1_CH1, TIM1_CH2, TIM1_CH3, TIM1_BKIN". Obviously this means you use these terms in your program to control the timer for PWM, but the datasheet doesn't explain anything about how to actually use these terms in your program. It just lists the term and nothing else. For example, how am I supposed to figure out how to engage TIM1_CH1N and TIM1_CH2N as a synchronous PWM signal that I can then use on my gate drivers for the mosfets?

This datasheet doesn't explain anything like the ATMEGA328P datasheet which easily lists exactly what each of the bits in these terms do so you can easily program it.

  • \$\begingroup\$ Modern MCUs have a stagging number of configuration options. Try to find example code that does something similar to what you want, modify it. Repeat for each functionality that you need. Merge code from various examples. \$\endgroup\$
    – Mattman944
    Feb 26, 2023 at 11:37
  • 1
    \$\begingroup\$ As a semi-related aside, the F1 is perhaps the oldest series of Cortex-M microcontrollers from ST. While there's nothing wrong with them per-se, there are newer series with various improvements, from lower power to lower cost or easier handling. Even the supremely cut down, cost-effective, STM32C0 has TIM1 (at ST, if a peripheral has the same name, it's the same peripheral). \$\endgroup\$
    – jaskij
    Feb 27, 2023 at 19:16

2 Answers 2


Generally speaking you won't find all the information in a single document on newer 32-bit MCUs. The "data sheet" is more like a light overview of capabilities with electrical characteristics.

You can start by signing up to ST and downloading their RM0008 reference manual (1136 page PDF. You can also find other useful documents related to this series of microcontrollers.

Then there is the documentation for the HAL, CMSIS and other software which comes from ST and ARM itself.

  • 3
    \$\begingroup\$ HAL = hardware abstraction layer, CMSIS = Common Microcontroller Software Interface Standard (abstraction layer). Of course you can program without using those if you want. There might be other documentation, depending on what you're trying to do, for example to use the USB you might not want to write every byte yourself. \$\endgroup\$ Feb 26, 2023 at 5:50
  • 1
    \$\begingroup\$ There’s plenty of app notes from ST and example projects on the web. Let Google be your guide. But as others have suggested, the reference manual is the first reference. \$\endgroup\$
    – Kartman
    Feb 26, 2023 at 6:28
  • 2
    \$\begingroup\$ Last I checked, you didn't need to sign up to download reference manuals from ST \$\endgroup\$ Feb 26, 2023 at 16:03
  • 1
    \$\begingroup\$ @ThreePhaseEel That could well be true. Software downloads definitely require signing up. The MX tool in particular would be useful to the OP. \$\endgroup\$ Feb 26, 2023 at 16:32
  • 1
    \$\begingroup\$ It's also a good idea to look at the errata sheets if there are any. I've wasted hours with known hardware errors in the past. \$\endgroup\$
    – nanash1
    Feb 27, 2023 at 8:51

ST Microelectronics separates things into Datasheets and User Reference Manuals. The datasheet has part specific information while the reference manual has the information common between parts of a line.

So things like pinouts which are specific to a part would be in the datasheet. Electrical characteristics are also in the datasheet.

But things like how peripherals work and registers are in the user reference manual.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.