diff --git a/data/chips/CH32V303RCT6.yaml b/data/chips/CH32V303RCT6.yaml index aeac5b8..da0ae3f 100644 --- a/data/chips/CH32V303RCT6.yaml +++ b/data/chips/CH32V303RCT6.yaml @@ -60,6 +60,7 @@ cores: - "../peripherals/FV2x_V3x_SPI3.yaml" - "../peripherals/FV2x_V3x_I2C1.yaml" - "../peripherals/FV2x_V3x_I2C2.yaml" + - "../peripherals/F2x_V3x_RNG.yaml" include_interrupts: "../interrupts/ch32v2_v3.yaml" include_dma_channels: diff --git a/data/chips/CH32V303VCT6.yaml b/data/chips/CH32V303VCT6.yaml index 9bd0100..a27c4ad 100644 --- a/data/chips/CH32V303VCT6.yaml +++ b/data/chips/CH32V303VCT6.yaml @@ -61,6 +61,7 @@ cores: - "../peripherals/FV2x_V3x_SPI3.yaml" - "../peripherals/FV2x_V3x_I2C1.yaml" - "../peripherals/FV2x_V3x_I2C2.yaml" + - "../peripherals/F2x_V3x_RNG.yaml" include_interrupts: "../interrupts/ch32v2_v3.yaml" include_dma_channels: diff --git a/data/chips/CH32V305FBP6.yaml b/data/chips/CH32V305FBP6.yaml index 2bdff01..2781f93 100644 --- a/data/chips/CH32V305FBP6.yaml +++ b/data/chips/CH32V305FBP6.yaml @@ -55,6 +55,7 @@ cores: - "../peripherals/FV2x_V3x_SPI2.yaml" - "../peripherals/FV2x_V3x_I2C1.yaml" - "../peripherals/FV2x_V3x_I2C2.yaml" + - "../peripherals/F2x_V3x_RNG.yaml" include_interrupts: "../interrupts/ch32v2_v3.yaml" include_dma_channels: diff --git a/data/chips/CH32V305GBU6.yaml b/data/chips/CH32V305GBU6.yaml index e05c4a7..0c10dd0 100644 --- a/data/chips/CH32V305GBU6.yaml +++ b/data/chips/CH32V305GBU6.yaml @@ -61,6 +61,7 @@ cores: - "../peripherals/FV2x_V3x_SPI3.yaml" - "../peripherals/FV2x_V3x_I2C1.yaml" - "../peripherals/FV2x_V3x_I2C2.yaml" + - "../peripherals/F2x_V3x_RNG.yaml" include_interrupts: "../interrupts/ch32v2_v3.yaml" include_dma_channels: diff --git a/data/chips/CH32V305RBT6.yaml b/data/chips/CH32V305RBT6.yaml index cfbb4f6..257f69a 100644 --- a/data/chips/CH32V305RBT6.yaml +++ b/data/chips/CH32V305RBT6.yaml @@ -60,6 +60,7 @@ cores: - "../peripherals/FV2x_V3x_SPI3.yaml" - "../peripherals/FV2x_V3x_I2C1.yaml" - "../peripherals/FV2x_V3x_I2C2.yaml" + - "../peripherals/F2x_V3x_RNG.yaml" include_interrupts: "../interrupts/ch32v2_v3.yaml" include_dma_channels: diff --git a/data/chips/CH32V307RCT6.yaml b/data/chips/CH32V307RCT6.yaml index 21a57f1..ee86ab1 100644 --- a/data/chips/CH32V307RCT6.yaml +++ b/data/chips/CH32V307RCT6.yaml @@ -67,6 +67,7 @@ cores: - "../peripherals/FV2x_V3x_SPI3.yaml" - "../peripherals/FV2x_V3x_I2C1.yaml" - "../peripherals/FV2x_V3x_I2C2.yaml" + - "../peripherals/F2x_V3x_RNG.yaml" include_interrupts: "../interrupts/ch32v2_v3.yaml" include_dma_channels: diff --git a/data/chips/CH32V307VCT6.yaml b/data/chips/CH32V307VCT6.yaml index f9eb206..5df6a12 100644 --- a/data/chips/CH32V307VCT6.yaml +++ b/data/chips/CH32V307VCT6.yaml @@ -69,6 +69,7 @@ cores: - "../peripherals/FV2x_V3x_SPI3.yaml" - "../peripherals/FV2x_V3x_I2C1.yaml" - "../peripherals/FV2x_V3x_I2C2.yaml" + - "../peripherals/F2x_V3x_RNG.yaml" include_interrupts: "../interrupts/ch32v2_v3.yaml" include_dma_channels: diff --git a/data/chips/CH32V307WCU6.yaml b/data/chips/CH32V307WCU6.yaml index 1180f5c..6d24e42 100644 --- a/data/chips/CH32V307WCU6.yaml +++ b/data/chips/CH32V307WCU6.yaml @@ -67,6 +67,7 @@ cores: - "../peripherals/FV2x_V3x_SPI3.yaml" - "../peripherals/FV2x_V3x_I2C1.yaml" - "../peripherals/FV2x_V3x_I2C2.yaml" + - "../peripherals/F2x_V3x_RNG.yaml" include_interrupts: "../interrupts/ch32v2_v3.yaml" include_dma_channels: diff --git a/data/interrupts/ch32v2_v3.yaml b/data/interrupts/ch32v2_v3.yaml index 203a369..ab0aa07 100644 --- a/data/interrupts/ch32v2_v3.yaml +++ b/data/interrupts/ch32v2_v3.yaml @@ -94,6 +94,10 @@ TIM8_UP: 60 TIM8_TRG_COM: 61 # 62 - TIM8 Capture Compare interrupt TIM8_CC: 62 +# 63 +RNG: 63 +# 65 +SDIO: 65 # 66 - TIM5 global interrupt TIM5: 66 # 67 - SPI3 global interrupt diff --git a/data/peripherals/F2x_V3x_RNG.yaml b/data/peripherals/F2x_V3x_RNG.yaml new file mode 100644 index 0000000..0c5713c --- /dev/null +++ b/data/peripherals/F2x_V3x_RNG.yaml @@ -0,0 +1,15 @@ +- name: RNG + address: 0x40023C00 + registers: + kind: rng + version: v3 + block: RNG + rcc: + bus_clock: HCLK + kernel_clock: HCLK + enable: + register: AHBPCENR + field: TRNG_EN + interrupts: + - signal: GLOBAL + interrupt: RNG diff --git a/data/registers/rng_v3.yaml b/data/registers/rng_v3.yaml index 457f370..58ee7d1 100644 --- a/data/registers/rng_v3.yaml +++ b/data/registers/rng_v3.yaml @@ -1,57 +1,49 @@ block/RNG: description: Random number generator. items: - - name: CR - description: control register. - byte_offset: 0 - fieldset: CR - - name: SR - description: status register. - byte_offset: 4 - fieldset: SR - - name: DR - description: data register. - byte_offset: 8 - access: Read - fieldset: DR + - name: CR + description: control register. + byte_offset: 0 + fieldset: CR + - name: SR + description: status register. + byte_offset: 4 + fieldset: SR + - name: DR + description: data register. + byte_offset: 8 + access: Read fieldset/CR: description: control register. fields: - - name: RNGEN - description: Random number generator enable. - bit_offset: 2 - bit_size: 1 - - name: IE - description: Interrupt enable. - bit_offset: 3 - bit_size: 1 -fieldset/DR: - description: data register. - fields: - - name: RNDATA - description: Random data. - bit_offset: 0 - bit_size: 32 + - name: RNGEN + description: Random number generator enable. + bit_offset: 2 + bit_size: 1 + - name: IE + description: Interrupt enable. + bit_offset: 3 + bit_size: 1 fieldset/SR: description: status register. fields: - - name: DRDY - description: Data ready. - bit_offset: 0 - bit_size: 1 - - name: CECS - description: Clock error current status. - bit_offset: 1 - bit_size: 1 - - name: SECS - description: Seed error current status. - bit_offset: 2 - bit_size: 1 - - name: CEIS - description: Clock error interrupt status. - bit_offset: 5 - bit_size: 1 - - name: SEIS - description: Seed error interrupt status. - bit_offset: 6 - bit_size: 1 + - name: DRDY + description: Data ready. + bit_offset: 0 + bit_size: 1 + - name: CECS + description: Clock error current status. + bit_offset: 1 + bit_size: 1 + - name: SECS + description: Seed error current status. + bit_offset: 2 + bit_size: 1 + - name: CEIS + description: Clock error interrupt status. + bit_offset: 5 + bit_size: 1 + - name: SEIS + description: Seed error interrupt status. + bit_offset: 6 + bit_size: 1