add lptim_v2a to chips.rs

This commit is contained in:
eZio Pan 2024-04-05 00:03:53 +08:00
parent 8b036d7f87
commit d9625637f2
4 changed files with 13 additions and 17 deletions

View File

@ -1,4 +1,4 @@
block/LPTIM1: block/LPTIM:
description: Low power timer. description: Low power timer.
items: items:
- name: ISR - name: ISR
@ -39,7 +39,6 @@ block/LPTIM1:
- name: OR - name: OR
description: LPTIM option register. description: LPTIM option register.
byte_offset: 32 byte_offset: 32
fieldset: OR
- name: RCR - name: RCR
description: LPTIM repetition register. description: LPTIM repetition register.
byte_offset: 40 byte_offset: 40
@ -265,17 +264,6 @@ fieldset/ISR:
description: Repetition register update Ok. description: Repetition register update Ok.
bit_offset: 8 bit_offset: 8
bit_size: 1 bit_size: 1
fieldset/OR:
description: LPTIM option register.
fields:
- name: OR_0
description: Option register bit 0.
bit_offset: 0
bit_size: 1
- name: OR_1
description: Option register bit 1.
bit_offset: 1
bit_size: 1
fieldset/RCR: fieldset/RCR:
description: LPTIM repetition register. description: LPTIM repetition register.
fields: fields:

View File

@ -481,6 +481,7 @@ impl PeriMatcher {
("STM32L.*:TIM(9|21|22):.*", ("timer", "v1", "TIM_2CH")), ("STM32L.*:TIM(9|21|22):.*", ("timer", "v1", "TIM_2CH")),
("STM32L.*:TIM15:.*", ("timer", "v1", "TIM_2CH_CMP")), ("STM32L.*:TIM15:.*", ("timer", "v1", "TIM_2CH_CMP")),
("STM32L.*:TIM(16|17):.*", ("timer", "v1", "TIM_1CH_CMP")), ("STM32L.*:TIM(16|17):.*", ("timer", "v1", "TIM_1CH_CMP")),
("STM32L5.*:LPTIM.*:.*", ("lptim", "v2a", "LPTIM")),
("STM32L.*:LPTIM(1|2|3):.*", ("lptim", "v1", "LPTIM")), ("STM32L.*:LPTIM(1|2|3):.*", ("lptim", "v1", "LPTIM")),
// AN4013 Table 4: STM32Gx/Hx/Ux/Wx (and Cx) serials // AN4013 Table 4: STM32Gx/Hx/Ux/Wx (and Cx) serials
// timer_v2 for STM32Gx/Hx/Ux/Wx (and Cx) serials // timer_v2 for STM32Gx/Hx/Ux/Wx (and Cx) serials
@ -493,6 +494,9 @@ impl PeriMatcher {
("STM32(G4|H5|U5|WBA).*:TIM12:.*", ("timer", "v2", "TIM_2CH")), ("STM32(G4|H5|U5|WBA).*:TIM12:.*", ("timer", "v2", "TIM_2CH")),
("STM32(G4|H5|U5|WBA).*:TIM15:.*", ("timer", "v2", "TIM_2CH_CMP")), ("STM32(G4|H5|U5|WBA).*:TIM15:.*", ("timer", "v2", "TIM_2CH_CMP")),
("STM32(G4|H5|U5|WBA).*:TIM(16|17):.*", ("timer", "v2", "TIM_1CH_CMP")), ("STM32(G4|H5|U5|WBA).*:TIM(16|17):.*", ("timer", "v2", "TIM_1CH_CMP")),
("STM32WL.*:LPTIM.*:.*", ("lptim", "v2a", "LPTIM")),
("STM32(H5|U5|WBA).*:LPTIM[12356]:.*", ("lptim", "v2b", "LPTIM_ADV")),
("STM32(H5|U5).*:LPTIM4:.*", ("lptim", "v2b", "LPTIM_BASIC")),
("STM32G4.*:HRTIM1:.*", ("hrtim", "v2", "HRTIM")), ("STM32G4.*:HRTIM1:.*", ("hrtim", "v2", "HRTIM")),
// timer_v1 for STM32Gx/Hx/Ux/Wx (and Cx) serials // timer_v1 for STM32Gx/Hx/Ux/Wx (and Cx) serials
("STM32(C|G0|H7|WB|WL).*:TIM(1|8|20):.*", ("timer", "v1", "TIM_ADV")), ("STM32(C|G0|H7|WB|WL).*:TIM(1|8|20):.*", ("timer", "v1", "TIM_ADV")),
@ -503,11 +507,7 @@ impl PeriMatcher {
("STM32(C|G0|H7|WB|WL).*:TIM12:.*", ("timer", "v1", "TIM_2CH")), ("STM32(C|G0|H7|WB|WL).*:TIM12:.*", ("timer", "v1", "TIM_2CH")),
("STM32(C|G0|H7|WB|WL).*:TIM15:.*", ("timer", "v1", "TIM_2CH_CMP")), ("STM32(C|G0|H7|WB|WL).*:TIM15:.*", ("timer", "v1", "TIM_2CH_CMP")),
("STM32(C|G0|H7|WB|WL).*:TIM(16|17):.*", ("timer", "v1", "TIM_1CH_CMP")), ("STM32(C|G0|H7|WB|WL).*:TIM(16|17):.*", ("timer", "v1", "TIM_1CH_CMP")),
// LPTIM for STM32Gx/Hx/Ux/Wx (and Cx) serials
("STM32(H5|U5|WBA).*:LPTIM[12356]:.*", ("lptim", "v2b", "LPTIM_ADV")),
("STM32(H5|U5).*:LPTIM4:.*", ("lptim", "v2b", "LPTIM_BASIC")),
("STM32(C|G|H7|U|W).*:LPTIM[1-6]:.*", ("lptim", "v1", "LPTIM")), ("STM32(C|G|H7|U|W).*:LPTIM[1-6]:.*", ("lptim", "v1", "LPTIM")),
// HRTIM for STM32Gx/Hx/Ux/Wx (and Cx) serials
("STM32[CGHUW].*:HRTIM1?:.*", ("hrtim", "v1", "HRTIM")), ("STM32[CGHUW].*:HRTIM1?:.*", ("hrtim", "v1", "HRTIM")),
// //
//// TIM mapping ends here //// //// TIM mapping ends here ////

View File

@ -0,0 +1,8 @@
transforms:
- !Rename
from: ^LPTIM1$
to: LPTIM
- !DeleteFieldsets
from: OR