apply transform

This commit is contained in:
eZio Pan 2024-02-21 23:51:11 +08:00
parent 85a2b65d5d
commit 4e21b5000b
2 changed files with 44 additions and 154 deletions

View File

@ -40,19 +40,19 @@ block/DTS:
fieldset/CFGR1: fieldset/CFGR1:
description: Temperature sensor configuration register 1. description: Temperature sensor configuration register 1.
fields: fields:
- name: TS1_EN - name: EN
description: 'Temperature sensor 1 enable bit This bit is set and cleared by software. Note: Once enabled, the temperature sensor is active after a specific delay time. The TS1_RDY flag will be set when the sensor is ready.' description: 'Temperature sensor 1 enable bit This bit is set and cleared by software. Note: Once enabled, the temperature sensor is active after a specific delay time. The TS1_RDY flag will be set when the sensor is ready.'
bit_offset: 0 bit_offset: 0
bit_size: 1 bit_size: 1
- name: TS1_START - name: START
description: Start frequency measurement on temperature sensor 1 This bit is set and cleared by software. description: Start frequency measurement on temperature sensor 1 This bit is set and cleared by software.
bit_offset: 4 bit_offset: 4
bit_size: 1 bit_size: 1
- name: TS1_INTRIG_SEL - name: INTRIG_SEL
description: 'Input trigger selection bit for temperature sensor 1 These bits are set and cleared by software. They select which input triggers a temperature measurement. Refer to Section 19.3.10: Trigger input.' description: 'Input trigger selection bit for temperature sensor 1 These bits are set and cleared by software. They select which input triggers a temperature measurement. Refer to Section 19.3.10: Trigger input.'
bit_offset: 8 bit_offset: 8
bit_size: 4 bit_size: 4
- name: TS1_SMP_TIME - name: SMP_TIME
description: Sampling time for temperature sensor 1 These bits allow increasing the sampling time to improve measurement precision. When the PCLK clock is selected as reference clock (REFCLK_SEL = 0), the measurement will be performed at TS1_SMP_TIME period of CLK_PTAT. When the LSE is selected as reference clock (REFCLK_SEL =1), the measurement will be performed at TS1_SMP_TIME period of LSE. description: Sampling time for temperature sensor 1 These bits allow increasing the sampling time to improve measurement precision. When the PCLK clock is selected as reference clock (REFCLK_SEL = 0), the measurement will be performed at TS1_SMP_TIME period of CLK_PTAT. When the LSE is selected as reference clock (REFCLK_SEL =1), the measurement will be performed at TS1_SMP_TIME period of LSE.
bit_offset: 16 bit_offset: 16
bit_size: 4 bit_size: 4
@ -71,252 +71,131 @@ fieldset/CFGR1:
fieldset/DR: fieldset/DR:
description: Temperature sensor data register. description: Temperature sensor data register.
fields: fields:
- name: TS1_MFREQ - name: MFREQ
description: Value of the counter output value for temperature sensor 1. description: Value of the counter output value for temperature sensor 1.
bit_offset: 0 bit_offset: 0
bit_size: 16 bit_size: 16
fieldset/ICIFR: fieldset/ICIFR:
description: Temperature sensor clear interrupt flag register. description: Temperature sensor clear interrupt flag register.
fields: fields:
- name: TS1_CITEF - name: CITEF
description: Interrupt clear flag for end of measurement on temperature sensor 1 Writing 1 to this bit clears the TS1_ITEF flag in the DTS_SR register. description: Interrupt clear flag for end of measurement on temperature sensor 1 Writing 1 to this bit clears the TS1_ITEF flag in the DTS_SR register.
bit_offset: 0 bit_offset: 0
bit_size: 1 bit_size: 1
- name: TS1_CITLF - name: CITLF
description: Interrupt clear flag for low threshold on temperature sensor 1 Writing 1 to this bit clears the TS1_ITLF flag in the DTS_SR register. description: Interrupt clear flag for low threshold on temperature sensor 1 Writing 1 to this bit clears the TS1_ITLF flag in the DTS_SR register.
bit_offset: 1 bit_offset: 1
bit_size: 1 bit_size: 1
- name: TS1_CITHF - name: CITHF
description: Interrupt clear flag for high threshold on temperature sensor 1 Writing this bit to 1 clears the TS1_ITHF flag in the DTS_SR register. description: Interrupt clear flag for high threshold on temperature sensor 1 Writing this bit to 1 clears the TS1_ITHF flag in the DTS_SR register.
bit_offset: 2 bit_offset: 2
bit_size: 1 bit_size: 1
- name: TS1_CAITEF - name: CAITEF
description: Write once bit. Clear the asynchronous IT flag for End Of Measure for thermal sensor 1. Writing 1 clears the TS1_AITEF flag of the DTS_SR register. description: Write once bit. Clear the asynchronous IT flag for End Of Measure for thermal sensor 1. Writing 1 clears the TS1_AITEF flag of the DTS_SR register.
bit_offset: 4 bit_offset: 4
bit_size: 1 bit_size: 1
- name: TS1_CAITLF - name: CAITLF
description: Asynchronous interrupt clear flag for low threshold on temperature sensor 1 Writing 1 to this bit clears the TS1_AITLF flag in the DTS_SR register. description: Asynchronous interrupt clear flag for low threshold on temperature sensor 1 Writing 1 to this bit clears the TS1_AITLF flag in the DTS_SR register.
bit_offset: 5 bit_offset: 5
bit_size: 1 bit_size: 1
- name: TS1_CAITHF - name: CAITHF
description: Asynchronous interrupt clear flag for high threshold on temperature sensor 1 Writing 1 to this bit clears the TS1_AITHF flag in the DTS_SR register. description: Asynchronous interrupt clear flag for high threshold on temperature sensor 1 Writing 1 to this bit clears the TS1_AITHF flag in the DTS_SR register.
bit_offset: 6 bit_offset: 6
bit_size: 1 bit_size: 1
fieldset/ITENR: fieldset/ITENR:
description: Temperature sensor interrupt enable register. description: Temperature sensor interrupt enable register.
fields: fields:
- name: TS1_ITEEN - name: ITEEN
description: Interrupt enable flag for end of measurement on temperature sensor 1, synchronized on PCLK. This bit are set and cleared by software. It enables the synchronous interrupt for end of measurement. description: Interrupt enable flag for end of measurement on temperature sensor 1, synchronized on PCLK. This bit are set and cleared by software. It enables the synchronous interrupt for end of measurement.
bit_offset: 0 bit_offset: 0
bit_size: 1 bit_size: 1
- name: TS1_ITLEN - name: ITLEN
description: Interrupt enable flag for low threshold on temperature sensor 1, synchronized on PCLK. This bit are set and cleared by software. It enables the synchronous interrupt when the measure reaches or is below the low threshold. description: Interrupt enable flag for low threshold on temperature sensor 1, synchronized on PCLK. This bit are set and cleared by software. It enables the synchronous interrupt when the measure reaches or is below the low threshold.
bit_offset: 1 bit_offset: 1
bit_size: 1 bit_size: 1
- name: TS1_ITHEN - name: ITHEN
description: Interrupt enable flag for high threshold on temperature sensor 1, synchronized on PCLK. This bit are set and cleared by software. It enables the interrupt when the measure reaches or is above the high threshold. description: Interrupt enable flag for high threshold on temperature sensor 1, synchronized on PCLK. This bit are set and cleared by software. It enables the interrupt when the measure reaches or is above the high threshold.
bit_offset: 2 bit_offset: 2
bit_size: 1 bit_size: 1
- name: TS1_AITEEN - name: AITEEN
description: Asynchronous interrupt enable flag for end of measurement on temperature sensor 1 This bit are set and cleared by software. It enables the asynchronous interrupt for end of measurement (only when REFCLK_SEL = 1). description: Asynchronous interrupt enable flag for end of measurement on temperature sensor 1 This bit are set and cleared by software. It enables the asynchronous interrupt for end of measurement (only when REFCLK_SEL = 1).
bit_offset: 4 bit_offset: 4
bit_size: 1 bit_size: 1
- name: TS1_AITLEN - name: AITLEN
description: Asynchronous interrupt enable flag for low threshold on temperature sensor 1. This bit are set and cleared by software. It enables the asynchronous interrupt when the temperature is below the low threshold (only when REFCLK_SEL= 1). description: Asynchronous interrupt enable flag for low threshold on temperature sensor 1. This bit are set and cleared by software. It enables the asynchronous interrupt when the temperature is below the low threshold (only when REFCLK_SEL= 1).
bit_offset: 5 bit_offset: 5
bit_size: 1 bit_size: 1
- name: TS1_AITHEN - name: AITHEN
description: Asynchronous interrupt enable flag on high threshold for temperature sensor 1. This bit are set and cleared by software. It enables the asynchronous interrupt when the temperature is above the high threshold (only when REFCLK_SEL= 1). description: Asynchronous interrupt enable flag on high threshold for temperature sensor 1. This bit are set and cleared by software. It enables the asynchronous interrupt when the temperature is above the high threshold (only when REFCLK_SEL= 1).
bit_offset: 6 bit_offset: 6
bit_size: 1 bit_size: 1
fieldset/ITR1: fieldset/ITR1:
description: Temperature sensor interrupt threshold register 1. description: Temperature sensor interrupt threshold register 1.
fields: fields:
- name: TS1_LITTHD - name: LITTHD
description: Low interrupt threshold for temperature sensor 1 These bits are set and cleared by software. They indicate the lowest value than can be reached before raising an interrupt signal. description: Low interrupt threshold for temperature sensor 1 These bits are set and cleared by software. They indicate the lowest value than can be reached before raising an interrupt signal.
bit_offset: 0 bit_offset: 0
bit_size: 16 bit_size: 16
- name: TS1_HITTHD - name: HITTHD
description: High interrupt threshold for temperature sensor 1 These bits are set and cleared by software. They indicate the highest value than can be reached before raising an interrupt signal. description: High interrupt threshold for temperature sensor 1 These bits are set and cleared by software. They indicate the highest value than can be reached before raising an interrupt signal.
bit_offset: 16 bit_offset: 16
bit_size: 16 bit_size: 16
fieldset/OR: fieldset/OR:
description: Temperature sensor option register. description: Temperature sensor option register.
fields: fields:
- name: TS_OP0 - name: OP
description: general purpose option bits. description: general purpose option bits.
bit_offset: 0 bit_offset: 0
bit_size: 1 bit_size: 1
- name: TS_OP1 array:
description: general purpose option bits. len: 32
bit_offset: 1 stride: 1
bit_size: 1
- name: TS_OP2
description: general purpose option bits.
bit_offset: 2
bit_size: 1
- name: TS_OP3
description: general purpose option bits.
bit_offset: 3
bit_size: 1
- name: TS_OP4
description: general purpose option bits.
bit_offset: 4
bit_size: 1
- name: TS_OP5
description: general purpose option bits.
bit_offset: 5
bit_size: 1
- name: TS_OP6
description: general purpose option bits.
bit_offset: 6
bit_size: 1
- name: TS_OP7
description: general purpose option bits.
bit_offset: 7
bit_size: 1
- name: TS_OP8
description: general purpose option bits.
bit_offset: 8
bit_size: 1
- name: TS_OP9
description: general purpose option bits.
bit_offset: 9
bit_size: 1
- name: TS_OP10
description: general purpose option bits.
bit_offset: 10
bit_size: 1
- name: TS_OP11
description: general purpose option bits.
bit_offset: 11
bit_size: 1
- name: TS_OP12
description: general purpose option bits.
bit_offset: 12
bit_size: 1
- name: TS_OP13
description: general purpose option bits.
bit_offset: 13
bit_size: 1
- name: TS_OP14
description: general purpose option bits.
bit_offset: 14
bit_size: 1
- name: TS_OP15
description: general purpose option bits.
bit_offset: 15
bit_size: 1
- name: TS_OP16
description: general purpose option bits.
bit_offset: 16
bit_size: 1
- name: TS_OP17
description: general purpose option bits.
bit_offset: 17
bit_size: 1
- name: TS_OP18
description: general purpose option bits.
bit_offset: 18
bit_size: 1
- name: TS_OP19
description: general purpose option bits.
bit_offset: 19
bit_size: 1
- name: TS_OP20
description: general purpose option bits.
bit_offset: 20
bit_size: 1
- name: TS_OP21
description: general purpose option bits.
bit_offset: 21
bit_size: 1
- name: TS_OP22
description: general purpose option bits.
bit_offset: 22
bit_size: 1
- name: TS_OP23
description: general purpose option bits.
bit_offset: 23
bit_size: 1
- name: TS_OP24
description: general purpose option bits.
bit_offset: 24
bit_size: 1
- name: TS_OP25
description: general purpose option bits.
bit_offset: 25
bit_size: 1
- name: TS_OP26
description: general purpose option bits.
bit_offset: 26
bit_size: 1
- name: TS_OP27
description: general purpose option bits.
bit_offset: 27
bit_size: 1
- name: TS_OP28
description: general purpose option bits.
bit_offset: 28
bit_size: 1
- name: TS_OP29
description: general purpose option bits.
bit_offset: 29
bit_size: 1
- name: TS_OP30
description: general purpose option bits.
bit_offset: 30
bit_size: 1
- name: TS_OP31
description: general purpose option bits.
bit_offset: 31
bit_size: 1
fieldset/RAMPVALR: fieldset/RAMPVALR:
description: Temperature sensor ramp value register. description: Temperature sensor ramp value register.
fields: fields:
- name: TS1_RAMP_COEFF - name: RAMP_COEFF
description: Engineering value of the ramp coefficient for the temperature sensor 1. This value is expressed in Hz/<2F>C. description: Engineering value of the ramp coefficient for the temperature sensor 1. This value is expressed in Hz/<2F>C.
bit_offset: 0 bit_offset: 0
bit_size: 16 bit_size: 16
fieldset/SR: fieldset/SR:
description: Temperature sensor status register. description: Temperature sensor status register.
fields: fields:
- name: TS1_ITEF - name: ITEF
description: 'Interrupt flag for end of measurement on temperature sensor 1, synchronized on PCLK. This bit is set by hardware when a temperature measure is done. It is cleared by software by writing 1 to the TS2_CITEF bit in the DTS_ICIFR register. Note: This bit is active only when the TS1_ITEFEN bit is set.' description: 'Interrupt flag for end of measurement on temperature sensor 1, synchronized on PCLK. This bit is set by hardware when a temperature measure is done. It is cleared by software by writing 1 to the TS2_CITEF bit in the DTS_ICIFR register. Note: This bit is active only when the TS1_ITEFEN bit is set.'
bit_offset: 0 bit_offset: 0
bit_size: 1 bit_size: 1
- name: TS1_ITLF - name: ITLF
description: 'Interrupt flag for low threshold on temperature sensor 1, synchronized on PCLK. This bit is set by hardware when the low threshold is set and reached. It is cleared by software by writing 1 to the TS1_CITLF bit in the DTS_ICIFR register. Note: This bit is active only when the TS1_ITLFEN bit is set.' description: 'Interrupt flag for low threshold on temperature sensor 1, synchronized on PCLK. This bit is set by hardware when the low threshold is set and reached. It is cleared by software by writing 1 to the TS1_CITLF bit in the DTS_ICIFR register. Note: This bit is active only when the TS1_ITLFEN bit is set.'
bit_offset: 1 bit_offset: 1
bit_size: 1 bit_size: 1
- name: TS1_ITHF - name: ITHF
description: 'Interrupt flag for high threshold on temperature sensor 1, synchronized on PCLK This bit is set by hardware when the high threshold is set and reached. It is cleared by software by writing 1 to the TS1_CITHF bit in the DTS_ICIFR register. Note: This bit is active only when the TS1_ITHFEN bit is set.' description: 'Interrupt flag for high threshold on temperature sensor 1, synchronized on PCLK This bit is set by hardware when the high threshold is set and reached. It is cleared by software by writing 1 to the TS1_CITHF bit in the DTS_ICIFR register. Note: This bit is active only when the TS1_ITHFEN bit is set.'
bit_offset: 2 bit_offset: 2
bit_size: 1 bit_size: 1
- name: TS1_AITEF - name: AITEF
description: 'Asynchronous interrupt flag for end of measure on temperature sensor 1 This bit is set by hardware when a temperature measure is done. It is cleared by software by writing 1 to the TS1_CAITEF bit in the DTS_ICIFR register. Note: This bit is active only when the TS1_AITEFEN bit is set.' description: 'Asynchronous interrupt flag for end of measure on temperature sensor 1 This bit is set by hardware when a temperature measure is done. It is cleared by software by writing 1 to the TS1_CAITEF bit in the DTS_ICIFR register. Note: This bit is active only when the TS1_AITEFEN bit is set.'
bit_offset: 4 bit_offset: 4
bit_size: 1 bit_size: 1
- name: TS1_AITLF - name: AITLF
description: 'Asynchronous interrupt flag for low threshold on temperature sensor 1 This bit is set by hardware when the low threshold is reached. It is cleared by software by writing 1 to the TS1_CAITLF bit in the DTS_ICIFR register. Note: This bit is active only when the TS1_AITLFEN bit is set.' description: 'Asynchronous interrupt flag for low threshold on temperature sensor 1 This bit is set by hardware when the low threshold is reached. It is cleared by software by writing 1 to the TS1_CAITLF bit in the DTS_ICIFR register. Note: This bit is active only when the TS1_AITLFEN bit is set.'
bit_offset: 5 bit_offset: 5
bit_size: 1 bit_size: 1
- name: TS1_AITHF - name: AITHF
description: 'Asynchronous interrupt flag for high threshold on temperature sensor 1 This bit is set by hardware when the high threshold is reached. It is cleared by software by writing 1 to the TS1_CAITHF bit in the DTS_ICIFR register. Note: This bit is active only when the TS1_AITHFEN bit is set.' description: 'Asynchronous interrupt flag for high threshold on temperature sensor 1 This bit is set by hardware when the high threshold is reached. It is cleared by software by writing 1 to the TS1_CAITHF bit in the DTS_ICIFR register. Note: This bit is active only when the TS1_AITHFEN bit is set.'
bit_offset: 6 bit_offset: 6
bit_size: 1 bit_size: 1
- name: TS1_RDY - name: RDY
description: Temperature sensor 1 ready flag This bit is set and reset by hardware. It indicates that a measurement is ongoing. description: Temperature sensor 1 ready flag This bit is set and reset by hardware. It indicates that a measurement is ongoing.
bit_offset: 15 bit_offset: 15
bit_size: 1 bit_size: 1
fieldset/T0VALR1: fieldset/T0VALR1:
description: Temperature sensor T0 value register 1. description: Temperature sensor T0 value register 1.
fields: fields:
- name: TS1_FMT0 - name: FMT0
description: Engineering value of the frequency measured at T0 for. temperature sensor 1 This value is expressed in 0.1 kHz. description: Engineering value of the frequency measured at T0 for. temperature sensor 1 This value is expressed in 0.1 kHz.
bit_offset: 0 bit_offset: 0
bit_size: 16 bit_size: 16
- name: TS1_T0 - name: T0
description: 'Engineering value of the T0 temperature for temperature sensor 1. Others: Reserved, must not be used.' description: 'Engineering value of the T0 temperature for temperature sensor 1. Others: Reserved, must not be used.'
bit_offset: 16 bit_offset: 16
bit_size: 2 bit_size: 2

11
transforms/DTS.yaml Normal file
View File

@ -0,0 +1,11 @@
transforms:
- !RenameFields
fieldset: .+
from: ^TS1_(.+)$
to: $1
- !MakeFieldArray
fieldsets: OR
from: TS_OP\d+
to: OP