-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
1,239 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,172 @@ | ||
- name: TIM8 | ||
address: 0x40013400 | ||
registers: | ||
kind: adtm | ||
kind: timer | ||
version: v3 | ||
block: ADTM | ||
# 0:默认映射(ETR/PA0,CH1/PC6,CH2/PC7, CH3/PC8 , CH4/PC9 , BKIN/PA6 , CH1N/PA7 , CH2N/PB0,CH3N/PB1); | ||
# 1:重映射(ETR/PA0,CH1/PB6,CH2/PB7, CH3/PB8,CH4/PC13,BKIN/PB9,CH1N/PA13, CH2N/PA14,CH3N/PA15); | ||
rcc: | ||
bus_clock: PCLK2 | ||
kernel_clock: PCLK2 | ||
enable: | ||
register: APB2PCENR | ||
field: TIM8EN | ||
reset: | ||
register: APB2PRSTR | ||
field: TIM8RST | ||
remap: | ||
register: PCFR2 | ||
field: TIM8_RM | ||
pins: | ||
# 0:默认映射(ETR/PA0,CH1/PC6,CH2/PC7, CH3/PC8 , CH4/PC9 , BKIN/PA6 , CH1N/PA7 , CH2N/PB0,CH3N/PB1); | ||
- { pin: "PA0", signal: "ETR", remap: 0b0 } | ||
- { pin: "PC6", signal: "CH1", remap: 0b0 } | ||
- { pin: "PC7", signal: "CH2", remap: 0b0 } | ||
- { pin: "PC8", signal: "CH3", remap: 0b0 } | ||
- { pin: "PC9", signal: "CH4", remap: 0b0 } | ||
- { pin: "PA6", signal: "BKIN", remap: 0b0 } | ||
- { pin: "PA7", signal: "CH1N", remap: 0b0 } | ||
- { pin: "PB0", signal: "CH2N", remap: 0b0 } | ||
- { pin: "PB1", signal: "CH3N", remap: 0b0 } | ||
# 1:重映射(ETR/PA0,CH1/PB6,CH2/PB7, CH3/PB8,CH4/PC13,BKIN/PB9,CH1N/PA13, CH2N/PA14,CH3N/PA15); | ||
- { pin: "PA0", signal: "ETR", remap: 0b1 } | ||
- { pin: "PB6", signal: "CH1", remap: 0b1 } | ||
- { pin: "PB7", signal: "CH2", remap: 0b1 } | ||
- { pin: "PB8", signal: "CH3", remap: 0b1 } | ||
- { pin: "PC13", signal: "CH4", remap: 0b1 } | ||
- { pin: "PB9", signal: "BKIN", remap: 0b1 } | ||
- { pin: "PA13", signal: "CH1N", remap: 0b1 } | ||
- { pin: "PA14", signal: "CH2N", remap: 0b1 } | ||
- { pin: "PA15", signal: "CH3N", remap: 0b1 } | ||
interrupts: | ||
- signal: BRK | ||
interrupt: TIM8_BRK | ||
- signal: UP | ||
interrupt: TIM8_UP | ||
- signal: TRG | ||
interrupt: TIM8_TRG_COM | ||
- signal: COM | ||
interrupt: TIM8_TRG_COM | ||
- signal: CC | ||
interrupt: TIM8_CC | ||
|
||
- name: TIM9 | ||
address: 0x40014C00 | ||
registers: | ||
kind: adtm | ||
kind: timer | ||
version: v3 | ||
block: ADTM | ||
# 00:默认映射(ETR/PA2,CH1/PA2,CH2/PA3, CH3/PA4 , CH4/PC4 , BKIN/PC5 , CH1N/PC0 , CH2N/PC1,CH3N/PC2); | ||
# 01:部分映射(ETR/PA2,CH1/PA2,CH2/PA3, CH3/PA4,CH4/PC14,BKIN/PA1,CH1N/PB0, CH2N/PB1,CH3N/PB2); | ||
# 1x:完全映射(ETR/PD9,CH1/PD9,CH2/PD11, CH3/PD13,CH4/PD15,BKIN/PD14,CH1N/PD8, CH2N/PD10,CH3N/PD12)。 | ||
rcc: | ||
bus_clock: PCLK2 | ||
kernel_clock: PCLK2 | ||
enable: | ||
register: APB2PCENR | ||
field: TIM9EN | ||
reset: | ||
register: APB2PRSTR | ||
field: TIM9RST | ||
remap: | ||
register: PCFR2 | ||
field: TIM9_RM | ||
pins: | ||
# 00:默认映射(ETR/PA2,CH1/PA2,CH2/PA3, CH3/PA4 , CH4/PC4 , BKIN/PC5 , CH1N/PC0 , CH2N/PC1,CH3N/PC2); | ||
- { pin: "PA2", signal: "ETR", remap: 0b00 } | ||
- { pin: "PA2", signal: "CH1", remap: 0b00 } | ||
- { pin: "PA3", signal: "CH2", remap: 0b00 } | ||
- { pin: "PA4", signal: "CH3", remap: 0b00 } | ||
- { pin: "PC4", signal: "CH4", remap: 0b00 } | ||
- { pin: "PC5", signal: "BKIN", remap: 0b00 } | ||
- { pin: "PC0", signal: "CH1N", remap: 0b00 } | ||
- { pin: "PC1", signal: "CH2N", remap: 0b00 } | ||
- { pin: "PC2", signal: "CH3N", remap: 0b00 } | ||
# 01:部分映射(ETR/PA2,CH1/PA2,CH2/PA3, CH3/PA4,CH4/PC14,BKIN/PA1,CH1N/PB0, CH2N/PB1,CH3N/PB2); | ||
- { pin: "PA2", signal: "ETR", remap: 0b01 } | ||
- { pin: "PA2", signal: "CH1", remap: 0b01 } | ||
- { pin: "PA3", signal: "CH2", remap: 0b01 } | ||
- { pin: "PA4", signal: "CH3", remap: 0b01 } | ||
- { pin: "PC14", signal: "CH4", remap: 0b01 } | ||
- { pin: "PA1", signal: "BKIN", remap: 0b01 } | ||
- { pin: "PB0", signal: "CH1N", remap: 0b01 } | ||
- { pin: "PB1", signal: "CH2N", remap: 0b01 } | ||
- { pin: "PB2", signal: "CH3N", remap: 0b01 } | ||
# 1x:完全映射(ETR/PD9,CH1/PD9,CH2/PD11, CH3/PD13,CH4/PD15,BKIN/PD14,CH1N/PD8, CH2N/PD10,CH3N/PD12)。 | ||
- { pin: "PD9", signal: "ETR", remap: 0b10 } | ||
- { pin: "PD9", signal: "CH1", remap: 0b10 } | ||
- { pin: "PD11", signal: "CH2", remap: 0b10 } | ||
- { pin: "PD13", signal: "CH3", remap: 0b10 } | ||
- { pin: "PD15", signal: "CH4", remap: 0b10 } | ||
- { pin: "PD14", signal: "BKIN", remap: 0b10 } | ||
- { pin: "PD8", signal: "CH1N", remap: 0b10 } | ||
- { pin: "PD10", signal: "CH2N", remap: 0b10 } | ||
- { pin: "PD12", signal: "CH3N", remap: 0b10 } | ||
interrupts: | ||
- signal: BRK | ||
interrupt: TIM9_BRK | ||
- signal: UP | ||
interrupt: TIM9_UP | ||
- signal: TRG | ||
interrupt: TIM9_TRG_COM | ||
- signal: COM | ||
interrupt: TIM9_TRG_COM | ||
- signal: CC | ||
interrupt: TIM9_CC | ||
|
||
- name: TIM10 | ||
address: 0x40015000 | ||
registers: | ||
kind: adtm | ||
kind: timer | ||
version: v3 | ||
block: ADTM | ||
# 00:默认映射(ETR/PC10,CH1/PB8,CH2/PB9, CH3/PC3,CH4/PC11,BKIN/PC12,CH1N/PA12, CH2N/PA13,CH3N/PA14); | ||
# 01:部分映射(ETR/PB11,CH1/PB3,CH2/PB4, CH3/PB5,CH4/PC15,BKIN/PB10,CH1N/PA5, CH2N/PA6,CH3N/PA7); | ||
# 1x:完全映射(ETR/PD0,CH1/PD1,CH2/PD3, CH3/PD5 , CH4/PD7 , BKIN/PE2 , CH1N/PE3 , CH2N/PE4,CH3N/PE5) | ||
rcc: | ||
bus_clock: PCLK2 | ||
kernel_clock: PCLK2 | ||
enable: | ||
register: APB2PCENR | ||
field: TIM10EN | ||
reset: | ||
register: APB2PRSTR | ||
field: TIM10RST | ||
remap: | ||
register: PCFR2 | ||
field: TIM10_RM | ||
pins: | ||
# 00:默认映射(ETR/PC10,CH1/PB8,CH2/PB9, CH3/PC3,CH4/PC11,BKIN/PC12,CH1N/PA12, CH2N/PA13,CH3N/PA14); | ||
- { pin: "PC10", signal: "ETR", remap: 0b00 } | ||
- { pin: "PB8", signal: "CH1", remap: 0b00 } | ||
- { pin: "PB9", signal: "CH2", remap: 0b00 } | ||
- { pin: "PC3", signal: "CH3", remap: 0b00 } | ||
- { pin: "PC11", signal: "CH4", remap: 0b00 } | ||
- { pin: "PC12", signal: "BKIN", remap: 0b00 } | ||
- { pin: "PA12", signal: "CH1N", remap: 0b00 } | ||
- { pin: "PA13", signal: "CH2N", remap: 0b00 } | ||
- { pin: "PA14", signal: "CH3N", remap: 0b00 } | ||
# 01:部分映射(ETR/PB11,CH1/PB3,CH2/PB4, CH3/PB5,CH4/PC15,BKIN/PB10,CH1N/PA5, CH2N/PA6,CH3N/PA7); | ||
- { pin: "PB11", signal: "ETR", remap: 0b01 } | ||
- { pin: "PB3", signal: "CH1", remap: 0b01 } | ||
- { pin: "PB4", signal: "CH2", remap: 0b01 } | ||
- { pin: "PB5", signal: "CH3", remap: 0b01 } | ||
- { pin: "PC15", signal: "CH4", remap: 0b01 } | ||
- { pin: "PB10", signal: "BKIN", remap: 0b01 } | ||
- { pin: "PA5", signal: "CH1N", remap: 0b01 } | ||
- { pin: "PA6", signal: "CH2N", remap: 0b01 } | ||
- { pin: "PA7", signal: "CH3N", remap: 0b01 } | ||
# 1x:完全映射(ETR/PD0,CH1/PD1,CH2/PD3, CH3/PD5 , CH4/PD7 , BKIN/PE2 , CH1N/PE3 , CH2N/PE4,CH3N/PE5) | ||
- { pin: "PD0", signal: "ETR", remap: 0b10 } | ||
- { pin: "PD1", signal: "CH1", remap: 0b10 } | ||
- { pin: "PD3", signal: "CH2", remap: 0b10 } | ||
- { pin: "PD5", signal: "CH3", remap: 0b10 } | ||
- { pin: "PD7", signal: "CH4", remap: 0b10 } | ||
- { pin: "PE2", signal: "BKIN", remap: 0b10 } | ||
- { pin: "PE3", signal: "CH1N", remap: 0b10 } | ||
- { pin: "PE4", signal: "CH2N", remap: 0b10 } | ||
- { pin: "PE5", signal: "CH3N", remap: 0b10 } | ||
interrupts: | ||
- signal: BRK | ||
interrupt: TIM10_BRK | ||
- signal: UP | ||
interrupt: TIM10_UP | ||
- signal: TRG | ||
interrupt: TIM10_TRG_COM | ||
- signal: COM | ||
interrupt: TIM10_TRG_COM | ||
- signal: CC | ||
interrupt: TIM10_CC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,40 @@ | ||
# BCTM, Basic Timer 6 and 7 | ||
# Only Update interrupt is available | ||
|
||
- name: TIM6 | ||
address: 0x40001000 | ||
registers: | ||
kind: bctm | ||
kind: timer | ||
version: v3 | ||
block: BCTM | ||
rcc: | ||
bus_clock: PCLK1 | ||
kernel_clock: PCLK1 | ||
enable: | ||
register: APB1PCENR | ||
field: TIM6EN | ||
reset: | ||
register: APB1PRSTR | ||
field: TIM6RST | ||
interrupts: | ||
- signal: UP | ||
interrupt: TIM6 | ||
|
||
- name: TIM7 | ||
address: 0x40001400 | ||
registers: | ||
kind: bctm | ||
kind: timer | ||
version: v3 | ||
block: BCTM | ||
rcc: | ||
bus_clock: PCLK1 | ||
kernel_clock: PCLK1 | ||
enable: | ||
register: APB1PCENR | ||
field: TIM7EN | ||
reset: | ||
register: APB1PRSTR | ||
field: TIM7RST | ||
interrupts: | ||
- signal: UP | ||
interrupt: TIM7 |
Oops, something went wrong.