Skip to content

Commit

Permalink
feat: adc for ch32l1
Browse files Browse the repository at this point in the history
  • Loading branch information
andelf committed May 14, 2024
1 parent 00b2cb7 commit 8fa4b1a
Show file tree
Hide file tree
Showing 2 changed files with 495 additions and 0 deletions.
44 changes: 44 additions & 0 deletions data/family/CH32L1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,50 @@
- { pin: "PB9", signal: "SCL", remap: 3 }
- { pin: "PB11", signal: "SDA", remap: 3 }

# ADC, 10 external channels, 3 internal channel
# - CH16 = Temperature
# - CH17, V_REFINT
# - CH18, V_DDA/2
- name: ADC1
address: 0x40012400
registers:
kind: adc
version: l1
block: ADC
rcc:
bus_clock: PCLK2
kernel_clock: ADC
enable:
register: APB2PCENR
field: ADCEN
reset:
register: APB2PRSTR
field: ADCRST
interrupts:
- signal: GLOBAL
interrupt: ADC
pins:
- pin: PA0
signal: IN0
- pin: PA1
signal: IN1
- pin: PA2
signal: IN2
- pin: PA3
signal: IN3
- pin: PA4
signal: IN4
- pin: PA5
signal: IN5
- pin: PA6
signal: IN6
- pin: PA7
signal: IN7
- pin: PB0
signal: IN8
- pin: PB1
signal: IN9

- name: CAN1
address: 0x40006400
registers:
Expand Down
Loading

0 comments on commit 8fa4b1a

Please sign in to comment.