SLAAEI9 December 2023 MSPM0C1103 , MSPM0C1103-Q1 , MSPM0C1104 , MSPM0C1104-Q1 , MSPM0G1105 , MSPM0G1106 , MSPM0G1107 , MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G3105 , MSPM0G3105-Q1 , MSPM0G3106 , MSPM0G3106-Q1 , MSPM0G3107 , MSPM0G3107-Q1 , MSPM0G3505 , MSPM0G3505-Q1 , MSPM0G3506 , MSPM0G3506-Q1 , MSPM0G3507 , MSPM0G3507-Q1 , MSPM0G3519 , MSPM0L1105 , MSPM0L1106 , MSPM0L1227 , MSPM0L1228
STM8 and MSPM0 both offer various timers. MSPM0 offers timers with varying features that support use cases from low power monitoring to advanced motor control.
STM8L | STM8S | MSPM0L | MSPM0C | ||||
---|---|---|---|---|---|---|---|
Timer Name | Abbreviated Name | Timer Name | Abbreviated Name | Timer Name | Abbreviated Name | Timer Name | Abbreviated Name |
Advanced control | TIM1 | Advanced control | TIMA0 | ||||
General purpose | TIM2,3 | General purpose | TIM2,3,5 | General purpose | TIMG0-11 | General purpose | TIMG8,14 |
Basic | TIM4 | Basic | TIM4,6 |
Feature | STM8L | STM8S | MSPM0L | MSPM0C |
---|---|---|---|---|
Resolution | 8, 16 bit | 8, 16 bit | 16 bit | 16 bit |
PWM | Yes | Yes | Yes | Yes |
Capture | Yes | Yes | Yes | Yes |
Compare | Yes | Yes | Yes | Yes |
Repetition counter | No | Yes | Yes | Yes |
One-shot | Yes | Yes | Yes | Yes |
Up down count functionality | Yes | Yes | Yes | Yes |
Low power modes | Yes | Yes | Yes | Yes |
QEI support | No | No | No | Yes |
Programmable prescalar | Yes | Yes | Yes | Yes |
Shadow register mode | Yes | Yes | Yes | Yes |
Events/Interrupt | Yes | Yes | Yes | Yes |
Auto reload functionality | Yes | Yes | Yes | Yes |
Fault handling | Yes | Yes | Yes | Yes |
STM8 | MSPM0 Equivalent | Reasoning |
---|---|---|
TIM1 | TIMA0 | Advanced control, 16-bit resolution, up/down counter, repeat counter |
TIM2, 3, 5 | TIMG0-11, TIMG14 | 16-bit resolution, General purpose,capture/ compare function |
TIM4, 6 | Any1 | Basic timer |
Feature | STM8L and STMS | MSPM0L and MSPM0C |
---|---|---|
PWM | TIM1TIM2, 3, 5 | All timers |
Capture | TIM1TIM2, 3, 5 | All timers |
Compare | TIM1TIM2, 3, 5 | All timers |
One-shot | TIM1TIM2, 3, 5 | All timers |
Prescaler | All timers | All timers |
Synchronization | All timers | All timers |
Timer Code Examples
Information about timer code examples can be found in the MSPM0 SDK examples guide.