From 09b1d3b63a26571f49227cc03c8456440ddf4cf2 Mon Sep 17 00:00:00 2001 From: eZio Pan Date: Wed, 21 Feb 2024 18:56:31 +0800 Subject: [PATCH] apply transform --- data/registers/tamp_h5.yaml | 774 ++++-------------------------------- transforms/TAMP.yaml | 85 ++++ 2 files changed, 159 insertions(+), 700 deletions(-) diff --git a/data/registers/tamp_h5.yaml b/data/registers/tamp_h5.yaml index 49f5b2a..ce7960a 100644 --- a/data/registers/tamp_h5.yaml +++ b/data/registers/tamp_h5.yaml @@ -24,7 +24,6 @@ block/TAMP: - name: ATSEEDR description: TAMP active tamper seed register. byte_offset: 20 - fieldset: ATSEEDR - name: ATOR description: TAMP active tamper output register. byte_offset: 24 @@ -64,194 +63,37 @@ block/TAMP: - name: COUNT1R description: TAMP monotonic counter 1 register. byte_offset: 64 - fieldset: COUNT1R - name: OR description: TAMP option register. byte_offset: 80 fieldset: OR - - name: ERCFGR + - name: RPCFGR description: TAMP erase configuration register. byte_offset: 84 - fieldset: ERCFGR - - name: BKP0R + fieldset: RPCFGR + - name: BKPR description: TAMP backup 0 register. + array: + len: 32 + stride: 4 byte_offset: 256 - fieldset: BKP0R - - name: BKP1R - description: TAMP backup 1 register. - byte_offset: 260 - fieldset: BKP1R - - name: BKP2R - description: TAMP backup 2 register. - byte_offset: 264 - fieldset: BKP2R - - name: BKP3R - description: TAMP backup 3 register. - byte_offset: 268 - fieldset: BKP3R - - name: BKP4R - description: TAMP backup 4 register. - byte_offset: 272 - fieldset: BKP4R - - name: BKP5R - description: TAMP backup 5 register. - byte_offset: 276 - fieldset: BKP5R - - name: BKP6R - description: TAMP backup 6 register. - byte_offset: 280 - fieldset: BKP6R - - name: BKP7R - description: TAMP backup 7 register. - byte_offset: 284 - fieldset: BKP7R - - name: BKP8R - description: TAMP backup 8 register. - byte_offset: 288 - fieldset: BKP8R - - name: BKP9R - description: TAMP backup 9 register. - byte_offset: 292 - fieldset: BKP9R - - name: BKP10R - description: TAMP backup 10 register. - byte_offset: 296 - fieldset: BKP10R - - name: BKP11R - description: TAMP backup 11 register. - byte_offset: 300 - fieldset: BKP11R - - name: BKP12R - description: TAMP backup 12 register. - byte_offset: 304 - fieldset: BKP12R - - name: BKP13R - description: TAMP backup 13 register. - byte_offset: 308 - fieldset: BKP13R - - name: BKP14R - description: TAMP backup 14 register. - byte_offset: 312 - fieldset: BKP14R - - name: BKP15R - description: TAMP backup 15 register. - byte_offset: 316 - fieldset: BKP15R - - name: BKP16R - description: TAMP backup 16 register. - byte_offset: 320 - fieldset: BKP16R - - name: BKP17R - description: TAMP backup 17 register. - byte_offset: 324 - fieldset: BKP17R - - name: BKP18R - description: TAMP backup 18 register. - byte_offset: 328 - fieldset: BKP18R - - name: BKP19R - description: TAMP backup 19 register. - byte_offset: 332 - fieldset: BKP19R - - name: BKP20R - description: TAMP backup 20 register. - byte_offset: 336 - fieldset: BKP20R - - name: BKP21R - description: TAMP backup 21 register. - byte_offset: 340 - fieldset: BKP21R - - name: BKP22R - description: TAMP backup 22 register. - byte_offset: 344 - fieldset: BKP22R - - name: BKP23R - description: TAMP backup 23 register. - byte_offset: 348 - fieldset: BKP23R - - name: BKP24R - description: TAMP backup 24 register. - byte_offset: 352 - fieldset: BKP24R - - name: BKP25R - description: TAMP backup 25 register. - byte_offset: 356 - fieldset: BKP25R - - name: BKP26R - description: TAMP backup 26 register. - byte_offset: 360 - fieldset: BKP26R - - name: BKP27R - description: TAMP backup 27 register. - byte_offset: 364 - fieldset: BKP27R - - name: BKP28R - description: TAMP backup 28 register. - byte_offset: 368 - fieldset: BKP28R - - name: BKP29R - description: TAMP backup 29 register. - byte_offset: 372 - fieldset: BKP29R - - name: BKP30R - description: TAMP backup 30 register. - byte_offset: 376 - fieldset: BKP30R - - name: BKP31R - description: TAMP backup 31 register. - byte_offset: 380 - fieldset: BKP31R fieldset/ATCR1: description: TAMP active tamper control register 1. fields: - - name: TAMP1AM + - name: TAMPAM description: Tamper 1 active mode. bit_offset: 0 bit_size: 1 - - name: TAMP2AM - description: Tamper 2 active mode. - bit_offset: 1 - bit_size: 1 - - name: TAMP3AM - description: Tamper 3 active mode. - bit_offset: 2 - bit_size: 1 - - name: TAMP4AM - description: Tamper 4 active mode. - bit_offset: 3 - bit_size: 1 - - name: TAMP5AM - description: Tamper 5 active mode. - bit_offset: 4 - bit_size: 1 - - name: TAMP6AM - description: Tamper 6 active mode. - bit_offset: 5 - bit_size: 1 - - name: TAMP7AM - description: Tamper 7 active mode. - bit_offset: 6 - bit_size: 1 - - name: TAMP8AM - description: Tamper 8 active mode. - bit_offset: 7 - bit_size: 1 - - name: ATOSEL1 + array: + len: 8 + stride: 1 + - name: ATOSEL description: Active tamper shared output 1 selection The selected output must be available in the package pinout. bit_offset: 8 bit_size: 2 - - name: ATOSEL2 - description: Active tamper shared output 2 selection The selected output must be available in the package pinout. - bit_offset: 10 - bit_size: 2 - - name: ATOSEL3 - description: Active tamper shared output 3 selection The selected output must be available in the package pinout. - bit_offset: 12 - bit_size: 2 - - name: ATOSEL4 - description: Active tamper shared output 4 selection The selected output must be available in the package pinout. - bit_offset: 14 - bit_size: 2 + array: + len: 4 + stride: 2 - name: ATCKSEL description: Active tamper RTC asynchronous prescaler clock selection These bits selects the RTC asynchronous prescaler stage output.The selected clock is CK_ATPRE. fCK_ATPRE = fRTCCLK / 2ATCKSEL when (PREDIV_A+1) = 128. ... These bits can be written only when all active tampers are disabled. The write protection remains for up to 1.5 ck_atpre cycles after all the active tampers are disable. bit_offset: 16 @@ -271,38 +113,13 @@ fieldset/ATCR1: fieldset/ATCR2: description: TAMP active tamper control register 2. fields: - - name: ATOSEL1 + - name: ATOSEL description: Active tamper shared output 1 selection The selected output must be available in the package pinout. Bits 9:8 are the mirror of ATOSEL1[1:0] in the TAMP_ATCR1, and so can also be read or written through TAMP_ATCR1. bit_offset: 8 bit_size: 3 - - name: ATOSEL2 - description: Active tamper shared output 2 selection The selected output must be available in the package pinout. Bits 12:11 are the mirror of ATOSEL2[1:0] in the TAMP_ATCR1, and so can also be read or written through TAMP_ATCR1. - bit_offset: 11 - bit_size: 3 - - name: ATOSEL3 - description: Active tamper shared output 3 selection The selected output must be available in the package pinout. Bits 15:14 are the mirror of ATOSEL3[1:0] in the TAMP_ATCR1, and so can also be read or written through TAMP_ATCR1. - bit_offset: 14 - bit_size: 3 - - name: ATOSEL4 - description: Active tamper shared output 4 selection The selected output must be available in the package pinout. Bits 18:17 are the mirror of ATOSEL2[1:0] in the TAMP_ATCR1, and so can also be read or written through TAMP_ATCR1. - bit_offset: 17 - bit_size: 3 - - name: ATOSEL5 - description: Active tamper shared output 5 selection The selected output must be available in the package pinout. - bit_offset: 20 - bit_size: 3 - - name: ATOSEL6 - description: Active tamper shared output 6 selection The selected output must be available in the package pinout. - bit_offset: 23 - bit_size: 3 - - name: ATOSEL7 - description: Active tamper shared output 7 selection The selected output must be available in the package pinout. - bit_offset: 26 - bit_size: 3 - - name: ATOSEL8 - description: Active tamper shared output 8 selection The selected output must be available in the package pinout. - bit_offset: 29 - bit_size: 3 + array: + len: 8 + stride: 3 fieldset/ATOR: description: TAMP active tamper output register. fields: @@ -318,279 +135,16 @@ fieldset/ATOR: description: Active tamper initialization status This flag is set by hardware when the PRNG has absorbed the first 128-bit seed, meaning that the enabled active tampers are functional. This flag is cleared when the active tampers are disabled. bit_offset: 15 bit_size: 1 -fieldset/ATSEEDR: - description: TAMP active tamper seed register. - fields: - - name: SEED - description: Pseudo-random generator seed value This register must be written four times with 32-bit values to provide the 128-bit seed to the PRNG. Writing to this register automatically sends the seed value to the PRNG. - bit_offset: 0 - bit_size: 32 -fieldset/BKP0R: - description: TAMP backup 0 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP10R: - description: TAMP backup 10 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP11R: - description: TAMP backup 11 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP12R: - description: TAMP backup 12 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP13R: - description: TAMP backup 13 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP14R: - description: TAMP backup 14 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP15R: - description: TAMP backup 15 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP16R: - description: TAMP backup 16 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP17R: - description: TAMP backup 17 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP18R: - description: TAMP backup 18 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP19R: - description: TAMP backup 19 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP1R: - description: TAMP backup 1 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP20R: - description: TAMP backup 20 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP21R: - description: TAMP backup 21 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP22R: - description: TAMP backup 22 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP23R: - description: TAMP backup 23 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP24R: - description: TAMP backup 24 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP25R: - description: TAMP backup 25 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP26R: - description: TAMP backup 26 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP27R: - description: TAMP backup 27 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP28R: - description: TAMP backup 28 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP29R: - description: TAMP backup 29 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP2R: - description: TAMP backup 2 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP30R: - description: TAMP backup 30 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP31R: - description: TAMP backup 31 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP3R: - description: TAMP backup 3 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP4R: - description: TAMP backup 4 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP5R: - description: TAMP backup 5 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP6R: - description: TAMP backup 6 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP7R: - description: TAMP backup 7 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP8R: - description: TAMP backup 8 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/BKP9R: - description: TAMP backup 9 register. - fields: - - name: BKP - description: The application can write or read data to and from these registers. In the default (ERASE) configuration this register is reset on a tamper detection event. It is forced to reset value as long as there is at least one internal or external tamper flag being set. This register is also reset when the readout protection (RDP) is disabled. - bit_offset: 0 - bit_size: 32 -fieldset/COUNT1R: - description: TAMP monotonic counter 1 register. - fields: - - name: COUNT - description: This register is read-only only and is incremented by one when a write access is done to this register. This register cannot roll-over and is frozen when reaching the maximum value. - bit_offset: 0 - bit_size: 32 fieldset/CR1: description: TAMP control register 1. fields: - - name: TAMP1E + - name: TAMPE description: Tamper detection on TAMP_IN1 enable. bit_offset: 0 bit_size: 1 - - name: TAMP2E - description: Tamper detection on TAMP_IN2 enable. - bit_offset: 1 - bit_size: 1 - - name: TAMP3E - description: Tamper detection on TAMP_IN3 enable. - bit_offset: 2 - bit_size: 1 - - name: TAMP4E - description: Tamper detection on TAMP_IN4 enable. - bit_offset: 3 - bit_size: 1 - - name: TAMP5E - description: Tamper detection on TAMP_IN5 enable. - bit_offset: 4 - bit_size: 1 - - name: TAMP6E - description: Tamper detection on TAMP_IN6 enable. - bit_offset: 5 - bit_size: 1 - - name: TAMP7E - description: Tamper detection on TAMP_IN7 enable. - bit_offset: 6 - bit_size: 1 - - name: TAMP8E - description: Tamper detection on TAMP_IN8 enable. - bit_offset: 7 - bit_size: 1 + array: + len: 8 + stride: 1 - name: ITAMP1E description: Internal tamper 1 enable. bit_offset: 16 @@ -646,50 +200,20 @@ fieldset/CR1: fieldset/CR2: description: TAMP control register 2. fields: - - name: TAMP1NOER + - name: TAMPPOM description: Tamper 1 no erase. bit_offset: 0 bit_size: 1 - - name: TAMP2NOER - description: Tamper 2 no erase. - bit_offset: 1 - bit_size: 1 - - name: TAMP3NOER - description: Tamper 3 no erase. - bit_offset: 2 - bit_size: 1 - - name: TAMP4NOER - description: Tamper 4 no erase. - bit_offset: 3 - bit_size: 1 - - name: TAMP5NOER - description: Tamper 5 no erase. - bit_offset: 4 - bit_size: 1 - - name: TAMP6NOER - description: Tamper 6 no erase. - bit_offset: 5 - bit_size: 1 - - name: TAMP7NOER - description: Tamper 7 no erase. - bit_offset: 6 - bit_size: 1 - - name: TAMP8NOER - description: Tamper 8 no erase. - bit_offset: 7 - bit_size: 1 - - name: TAMP1MSK + array: + len: 8 + stride: 1 + - name: TAMPMSK description: Tamper 1 mask The tamper 1 interrupt must not be enabled when TAMP1MSK is set. bit_offset: 16 bit_size: 1 - - name: TAMP2MSK - description: Tamper 2 mask The tamper 2 interrupt must not be enabled when TAMP2MSK is set. - bit_offset: 17 - bit_size: 1 - - name: TAMP3MSK - description: Tamper 3 mask The tamper 3 interrupt must not be enabled when TAMP3MSK is set. - bit_offset: 18 - bit_size: 1 + array: + len: 3 + stride: 1 - name: BKBLOCK description: Backup registers and device secrets access blocked. bit_offset: 22 @@ -698,100 +222,68 @@ fieldset/CR2: description: Backup registers and device secrets erase Writing ‘1’ to this bit reset the backup registers and device secrets(1). Writing 0 has no effect. This bit is always read as 0. bit_offset: 23 bit_size: 1 - - name: TAMP1TRG + - name: TAMPTRG description: Active level for tamper 1 input If TAMPFLT = 00 Tamper 1 input rising edge triggers a tamper detection event. If TAMPFLT = 00 Tamper 1 input falling edge triggers a tamper detection event. bit_offset: 24 bit_size: 1 - - name: TAMP2TRG - description: Active level for tamper 2 input If TAMPFLT = 00 Tamper 2 input rising edge triggers a tamper detection event. If TAMPFLT = 00 Tamper 2 input falling edge triggers a tamper detection event. - bit_offset: 25 - bit_size: 1 - - name: TAMP3TRG - description: Active level for tamper 3 input If TAMPFLT = 00 Tamper 3 input rising edge triggers a tamper detection event. If TAMPFLT = 00 Tamper 3 input falling edge triggers a tamper detection event. - bit_offset: 26 - bit_size: 1 - - name: TAMP4TRG - description: Active level for tamper 4 input (active mode disabled) If TAMPFLT = 00 Tamper 4 input rising edge triggers a tamper detection event. If TAMPFLT = 00 Tamper 4 input falling edge triggers a tamper detection event. - bit_offset: 27 - bit_size: 1 - - name: TAMP5TRG - description: Active level for tamper 5 input (active mode disabled) If TAMPFLT = 00 Tamper 5 input rising edge triggers a tamper detection event. If TAMPFLT = 00 Tamper 5 input falling edge triggers a tamper detection event. - bit_offset: 28 - bit_size: 1 - - name: TAMP6TRG - description: Active level for tamper 6 input (active mode disabled) If TAMPFLT = 00 Tamper 6 input rising edge triggers a tamper detection event. If TAMPFLT = 00 Tamper 6 input falling edge triggers a tamper detection event. - bit_offset: 29 - bit_size: 1 - - name: TAMP7TRG - description: Active level for tamper 7 input (active mode disabled) If TAMPFLT = 00 Tamper 7 input rising edge triggers a tamper detection event. If TAMPFLT = 00 Tamper 7 input falling edge triggers a tamper detection event. - bit_offset: 30 - bit_size: 1 - - name: TAMP8TRG - description: Active level for tamper 8 input (active mode disabled) If TAMPFLT = 00 Tamper 8 input rising edge triggers a tamper detection event. If TAMPFLT = 00 Tamper 8 input falling edge triggers a tamper detection event. - bit_offset: 31 - bit_size: 1 + array: + len: 8 + stride: 1 fieldset/CR3: description: TAMP control register 3. fields: - - name: ITAMP1NOER + - name: ITAMP1POM description: Internal Tamper 1 no erase. bit_offset: 0 bit_size: 1 - - name: ITAMP2NOER + - name: ITAMP2POM description: Internal Tamper 2 no erase. bit_offset: 1 bit_size: 1 - - name: ITAMP3NOER + - name: ITAMP3POM description: Internal Tamper 3 no erase. bit_offset: 2 bit_size: 1 - - name: ITAMP4NOER + - name: ITAMP4POM description: Internal Tamper 4 no erase. bit_offset: 3 bit_size: 1 - - name: ITAMP5NOER + - name: ITAMP5POM description: Internal Tamper 5 no erase. bit_offset: 4 bit_size: 1 - - name: ITAMP6NOER + - name: ITAMP6POM description: Internal Tamper 6 no erase. bit_offset: 5 bit_size: 1 - - name: ITAMP7NOER + - name: ITAMP7POM description: Internal Tamper 7 no erase. bit_offset: 6 bit_size: 1 - - name: ITAMP8NOER + - name: ITAMP8POM description: Internal Tamper 8 no erase. bit_offset: 7 bit_size: 1 - - name: ITAMP9NOER + - name: ITAMP9POM description: Internal Tamper 9 no erase. bit_offset: 8 bit_size: 1 - - name: ITAMP11NOER + - name: ITAMP11POM description: Internal Tamper 11 no erase. bit_offset: 10 bit_size: 1 - - name: ITAMP12NOER + - name: ITAMP12POM description: Internal Tamper 12 no erase. bit_offset: 11 bit_size: 1 - - name: ITAMP13NOER + - name: ITAMP13POM description: Internal Tamper 13 no erase. bit_offset: 12 bit_size: 1 - - name: ITAMP15NOER + - name: ITAMP15POM description: Internal Tamper 15 no erase. bit_offset: 14 bit_size: 1 -fieldset/ERCFGR: - description: TAMP erase configuration register. - fields: - - name: ERCFG0 - description: Configurable device secrets configuration. - bit_offset: 0 - bit_size: 1 fieldset/FLTCR: description: TAMP filter control register. fields: @@ -814,38 +306,13 @@ fieldset/FLTCR: fieldset/IER: description: TAMP interrupt enable register. fields: - - name: TAMP1IE + - name: TAMPIE description: Tamper 1 interrupt enable. bit_offset: 0 bit_size: 1 - - name: TAMP2IE - description: Tamper 2 interrupt enable. - bit_offset: 1 - bit_size: 1 - - name: TAMP3IE - description: Tamper 3 interrupt enable. - bit_offset: 2 - bit_size: 1 - - name: TAMP4IE - description: Tamper 4 interrupt enable. - bit_offset: 3 - bit_size: 1 - - name: TAMP5IE - description: Tamper 5 interrupt enable. - bit_offset: 4 - bit_size: 1 - - name: TAMP6IE - description: Tamper 6 interrupt enable. - bit_offset: 5 - bit_size: 1 - - name: TAMP7IE - description: Tamper 7interrupt enable. - bit_offset: 6 - bit_size: 1 - - name: TAMP8IE - description: Tamper 8 interrupt enable. - bit_offset: 7 - bit_size: 1 + array: + len: 8 + stride: 1 - name: ITAMP1IE description: Internal tamper 1 interrupt enable. bit_offset: 16 @@ -901,38 +368,13 @@ fieldset/IER: fieldset/MISR: description: TAMP non-secure masked interrupt status register. fields: - - name: TAMP1MF + - name: TAMPMF description: TAMP1 non-secure interrupt masked flag This flag is set by hardware when the tamper 1 non-secure interrupt is raised. bit_offset: 0 bit_size: 1 - - name: TAMP2MF - description: TAMP2 non-secure interrupt masked flag This flag is set by hardware when the tamper 2 non-secure interrupt is raised. - bit_offset: 1 - bit_size: 1 - - name: TAMP3MF - description: TAMP3 non-secure interrupt masked flag This flag is set by hardware when the tamper 3 non-secure interrupt is raised. - bit_offset: 2 - bit_size: 1 - - name: TAMP4MF - description: TAMP4 non-secure interrupt masked flag This flag is set by hardware when the tamper 4 non-secure interrupt is raised. - bit_offset: 3 - bit_size: 1 - - name: TAMP5MF - description: TAMP5 non-secure interrupt masked flag This flag is set by hardware when the tamper 5 non-secure interrupt is raised. - bit_offset: 4 - bit_size: 1 - - name: TAMP6MF - description: TAMP6 non-secure interrupt masked flag This flag is set by hardware when the tamper 6 non-secure interrupt is raised. - bit_offset: 5 - bit_size: 1 - - name: TAMP7MF - description: TAMP7 non-secure interrupt masked flag This flag is set by hardware when the tamper 7 non-secure interrupt is raised. - bit_offset: 6 - bit_size: 1 - - name: TAMP8MF - description: TAMP8 non-secure interrupt masked flag This flag is set by hardware when the tamper 8 non-secure interrupt is raised. - bit_offset: 7 - bit_size: 1 + array: + len: 8 + stride: 1 - name: ITAMP1MF description: Internal tamper 1 non-secure interrupt masked flag This flag is set by hardware when the internal tamper 1 non-secure interrupt is raised. bit_offset: 16 @@ -1027,41 +469,23 @@ fieldset/PRIVCFGR: description: 'Tamper privilege protection (excluding backup registers) Note: Refer to for details on the read protection.' bit_offset: 31 bit_size: 1 +fieldset/RPCFGR: + description: TAMP erase configuration register. + fields: + - name: RPCFG0 + description: Configurable device secrets configuration. + bit_offset: 0 + bit_size: 1 fieldset/SCR: description: TAMP status clear register. fields: - - name: CTAMP1F + - name: CTAMPF description: Clear TAMP1 detection flag Writing 1 in this bit clears the TAMP1F bit in the TAMP_SR register. bit_offset: 0 bit_size: 1 - - name: CTAMP2F - description: Clear TAMP2 detection flag Writing 1 in this bit clears the TAMP2F bit in the TAMP_SR register. - bit_offset: 1 - bit_size: 1 - - name: CTAMP3F - description: Clear TAMP3 detection flag Writing 1 in this bit clears the TAMP3F bit in the TAMP_SR register. - bit_offset: 2 - bit_size: 1 - - name: CTAMP4F - description: Clear TAMP4 detection flag Writing 1 in this bit clears the TAMP4F bit in the TAMP_SR register. - bit_offset: 3 - bit_size: 1 - - name: CTAMP5F - description: Clear TAMP5 detection flag Writing 1 in this bit clears the TAMP5F bit in the TAMP_SR register. - bit_offset: 4 - bit_size: 1 - - name: CTAMP6F - description: Clear TAMP6 detection flag Writing 1 in this bit clears the TAMP6F bit in the TAMP_SR register. - bit_offset: 5 - bit_size: 1 - - name: CTAMP7F - description: Clear TAMP7 detection flag Writing 1 in this bit clears the TAMP7F bit in the TAMP_SR register. - bit_offset: 6 - bit_size: 1 - - name: CTAMP8F - description: Clear TAMP8 detection flag Writing 1 in this bit clears the TAMP8F bit in the TAMP_SR register. - bit_offset: 7 - bit_size: 1 + array: + len: 8 + stride: 1 - name: CITAMP1F description: Clear ITAMP1 detection flag Writing 1 in this bit clears the ITAMP1F bit in the TAMP_SR register. bit_offset: 16 @@ -1140,38 +564,13 @@ fieldset/SECCFGR: fieldset/SMISR: description: TAMP secure masked interrupt status register. fields: - - name: TAMP1MF + - name: TAMPMF description: TAMP1 secure interrupt masked flag This flag is set by hardware when the tamper 1 secure interrupt is raised. bit_offset: 0 bit_size: 1 - - name: TAMP2MF - description: TAMP2 secure interrupt masked flag This flag is set by hardware when the tamper 2 secure interrupt is raised. - bit_offset: 1 - bit_size: 1 - - name: TAMP3MF - description: TAMP3 secure interrupt masked flag This flag is set by hardware when the tamper 3 secure interrupt is raised. - bit_offset: 2 - bit_size: 1 - - name: TAMP4MF - description: TAMP4 secure interrupt masked flag This flag is set by hardware when the tamper 4 secure interrupt is raised. - bit_offset: 3 - bit_size: 1 - - name: TAMP5MF - description: TAMP5 secure interrupt masked flag This flag is set by hardware when the tamper 5 secure interrupt is raised. - bit_offset: 4 - bit_size: 1 - - name: TAMP6MF - description: TAMP6 secure interrupt masked flag This flag is set by hardware when the tamper 6 secure interrupt is raised. - bit_offset: 5 - bit_size: 1 - - name: TAMP7MF - description: TAMP7 secure interrupt masked flag This flag is set by hardware when the tamper 7 secure interrupt is raised. - bit_offset: 6 - bit_size: 1 - - name: TAMP8MF - description: TAMP8 secure interrupt masked flag This flag is set by hardware when the tamper 8 secure interrupt is raised. - bit_offset: 7 - bit_size: 1 + array: + len: 8 + stride: 1 - name: ITAMP1MF description: Internal tamper 1 secure interrupt masked flag This flag is set by hardware when the internal tamper 1 secure interrupt is raised. bit_offset: 16 @@ -1227,38 +626,13 @@ fieldset/SMISR: fieldset/SR: description: TAMP status register. fields: - - name: TAMP1F + - name: TAMPF description: TAMP1 detection flag This flag is set by hardware when a tamper detection event is detected on the TAMP1 input. bit_offset: 0 bit_size: 1 - - name: TAMP2F - description: TAMP2 detection flag This flag is set by hardware when a tamper detection event is detected on the TAMP2 input. - bit_offset: 1 - bit_size: 1 - - name: TAMP3F - description: TAMP3 detection flag This flag is set by hardware when a tamper detection event is detected on the TAMP3 input. - bit_offset: 2 - bit_size: 1 - - name: TAMP4F - description: TAMP4 detection flag This flag is set by hardware when a tamper detection event is detected on the TAMP4 input. - bit_offset: 3 - bit_size: 1 - - name: TAMP5F - description: TAMP5 detection flag This flag is set by hardware when a tamper detection event is detected on the TAMP5 input. - bit_offset: 4 - bit_size: 1 - - name: TAMP6F - description: TAMP6 detection flag This flag is set by hardware when a tamper detection event is detected on the TAMP6 input. - bit_offset: 5 - bit_size: 1 - - name: TAMP7F - description: TAMP7 detection flag This flag is set by hardware when a tamper detection event is detected on the TAMP7 input. - bit_offset: 6 - bit_size: 1 - - name: TAMP8F - description: TAMP8 detection flag This flag is set by hardware when a tamper detection event is detected on the TAMP8 input. - bit_offset: 7 - bit_size: 1 + array: + len: 8 + stride: 1 - name: ITAMP1F description: Internal tamper 1 flag This flag is set by hardware when a tamper detection event is detected on the internal tamper 1. bit_offset: 16 diff --git a/transforms/TAMP.yaml b/transforms/TAMP.yaml index ddd62db..007a74b 100644 --- a/transforms/TAMP.yaml +++ b/transforms/TAMP.yaml @@ -1,3 +1,88 @@ transforms: - !DeleteEnums from: ^(BHKLOCK|ERCFG|PRIV|SEC)$ + + - !DeleteFieldsets + from: ^(BKP\d+R|COUNT\dR)$ + + - !MakeRegisterArray + blocks: ^TAMP$ + from: ^BKP\d+R$ + to: BKPR + + - !MakeFieldArray + fieldsets: ATCR1 + from: TAMP\dAM + to: TAMPAM + + - !MakeFieldArray + fieldsets: ATCR\d + from: ATOSEL\d + to: ATOSEL + + - !MakeFieldArray + fieldsets: CR1 + from: ^TAMP\d(E|NOER|MSK|TRG)$ + to: TAMP${1} + + - !RenameFields + fieldset: CR2 + from: TAMP(\d)NOER + to: TAMP${1}POM + + - !MakeFieldArray + fieldsets: CR2 + from: ^TAMP\d(POM|MSK|TRG)$ + to: TAMP${1} + + - !RenameFields + fieldset: CR3 + from: ITAMP(\d+)NOER + to: ITAMP${1}POM + + - !RenameRegisters + block: TAMP + from: ERCFGR + to: RPCFGR + + - !Rename + from: ERCFGR + to: RPCFGR + + - !RenameFields + fieldset: RPCFGR + from: ERCFG(\d) + to: RPCFG${1} + + - !MakeFieldArray + fieldsets: IER + from: TAMP\dIE + to: TAMPIE + + - !MakeFieldArray + fieldsets: CR2 + from: ^TAMP\d(POM|MSK|TRG)$ + to: TAMP${1} + + - !MakeFieldArray + fieldsets: MISR + from: ^TAMP\dMF$ + to: TAMPMF + + - !MakeFieldArray + fieldsets: SCR + from: ^CTAMP\dF$ + to: CTAMPF + + - !MakeFieldArray + fieldsets: SMISR + from: ^TAMP\dMF$ + to: TAMPMF + + - !MakeFieldArray + fieldsets: SR + from: ^TAMP\dF$ + to: TAMPF + + - !DeleteFieldsets + from: ATSEEDR