Skip to content

Commit 9c3538e

Browse files
authored
Remove MASTER_ON_HOLD bit from I2C status registers. Fix typos. (#326)
1 parent ec16d3f commit 9c3538e

File tree

3 files changed

+8
-111
lines changed

3 files changed

+8
-111
lines changed

src/rp2040/hardware_regs/include/hardware/regs/i2c.h

Lines changed: 5 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -585,24 +585,9 @@
585585
// matching interrupt clear register. The unmasked raw versions of
586586
// these bits are available in the IC_RAW_INTR_STAT register.
587587
#define I2C_IC_INTR_STAT_OFFSET _u(0x0000002c)
588-
#define I2C_IC_INTR_STAT_BITS _u(0x00003fff)
588+
#define I2C_IC_INTR_STAT_BITS _u(0x00001fff)
589589
#define I2C_IC_INTR_STAT_RESET _u(0x00000000)
590590
// -----------------------------------------------------------------------------
591-
// Field : I2C_IC_INTR_STAT_R_MASTER_ON_HOLD
592-
// Description : See IC_RAW_INTR_STAT for a detailed description of
593-
// R_MASTER_ON_HOLD bit.
594-
//
595-
// Reset value: 0x0
596-
// 0x0 -> R_MASTER_ON_HOLD interrupt is inactive
597-
// 0x1 -> R_MASTER_ON_HOLD interrupt is active
598-
#define I2C_IC_INTR_STAT_R_MASTER_ON_HOLD_RESET _u(0x0)
599-
#define I2C_IC_INTR_STAT_R_MASTER_ON_HOLD_BITS _u(0x00002000)
600-
#define I2C_IC_INTR_STAT_R_MASTER_ON_HOLD_MSB _u(13)
601-
#define I2C_IC_INTR_STAT_R_MASTER_ON_HOLD_LSB _u(13)
602-
#define I2C_IC_INTR_STAT_R_MASTER_ON_HOLD_ACCESS "RO"
603-
#define I2C_IC_INTR_STAT_R_MASTER_ON_HOLD_VALUE_INACTIVE _u(0x0)
604-
#define I2C_IC_INTR_STAT_R_MASTER_ON_HOLD_VALUE_ACTIVE _u(0x1)
605-
// -----------------------------------------------------------------------------
606591
// Field : I2C_IC_INTR_STAT_R_RESTART_DET
607592
// Description : See IC_RAW_INTR_STAT for a detailed description of
608593
// R_RESTART_DET bit.
@@ -805,24 +790,9 @@
805790
// register is active low; a value of 0 masks the interrupt,
806791
// whereas a value of 1 unmasks the interrupt.
807792
#define I2C_IC_INTR_MASK_OFFSET _u(0x00000030)
808-
#define I2C_IC_INTR_MASK_BITS _u(0x00003fff)
793+
#define I2C_IC_INTR_MASK_BITS _u(0x00001fff)
809794
#define I2C_IC_INTR_MASK_RESET _u(0x000008ff)
810795
// -----------------------------------------------------------------------------
811-
// Field : I2C_IC_INTR_MASK_M_MASTER_ON_HOLD_READ_ONLY
812-
// Description : This M_MASTER_ON_HOLD_read_only bit masks the R_MASTER_ON_HOLD
813-
// interrupt in IC_INTR_STAT register.
814-
//
815-
// Reset value: 0x0
816-
// 0x0 -> MASTER_ON_HOLD interrupt is masked
817-
// 0x1 -> MASTER_ON_HOLD interrupt is unmasked
818-
#define I2C_IC_INTR_MASK_M_MASTER_ON_HOLD_READ_ONLY_RESET _u(0x0)
819-
#define I2C_IC_INTR_MASK_M_MASTER_ON_HOLD_READ_ONLY_BITS _u(0x00002000)
820-
#define I2C_IC_INTR_MASK_M_MASTER_ON_HOLD_READ_ONLY_MSB _u(13)
821-
#define I2C_IC_INTR_MASK_M_MASTER_ON_HOLD_READ_ONLY_LSB _u(13)
822-
#define I2C_IC_INTR_MASK_M_MASTER_ON_HOLD_READ_ONLY_ACCESS "RO"
823-
#define I2C_IC_INTR_MASK_M_MASTER_ON_HOLD_READ_ONLY_VALUE_ENABLED _u(0x0)
824-
#define I2C_IC_INTR_MASK_M_MASTER_ON_HOLD_READ_ONLY_VALUE_DISABLED _u(0x1)
825-
// -----------------------------------------------------------------------------
826796
// Field : I2C_IC_INTR_MASK_M_RESTART_DET
827797
// Description : This bit masks the R_RESTART_DET interrupt in IC_INTR_STAT
828798
// register.
@@ -1023,25 +993,9 @@
1023993
// Unlike the IC_INTR_STAT register, these bits are not masked so
1024994
// they always show the true status of the DW_apb_i2c.
1025995
#define I2C_IC_RAW_INTR_STAT_OFFSET _u(0x00000034)
1026-
#define I2C_IC_RAW_INTR_STAT_BITS _u(0x00003fff)
996+
#define I2C_IC_RAW_INTR_STAT_BITS _u(0x00001fff)
1027997
#define I2C_IC_RAW_INTR_STAT_RESET _u(0x00000000)
1028998
// -----------------------------------------------------------------------------
1029-
// Field : I2C_IC_RAW_INTR_STAT_MASTER_ON_HOLD
1030-
// Description : Indicates whether master is holding the bus and TX FIFO is
1031-
// empty. Enabled only when I2C_DYNAMIC_TAR_UPDATE=1 and
1032-
// IC_EMPTYFIFO_HOLD_MASTER_EN=1.
1033-
//
1034-
// Reset value: 0x0
1035-
// 0x0 -> MASTER_ON_HOLD interrupt is inactive
1036-
// 0x1 -> MASTER_ON_HOLD interrupt is active
1037-
#define I2C_IC_RAW_INTR_STAT_MASTER_ON_HOLD_RESET _u(0x0)
1038-
#define I2C_IC_RAW_INTR_STAT_MASTER_ON_HOLD_BITS _u(0x00002000)
1039-
#define I2C_IC_RAW_INTR_STAT_MASTER_ON_HOLD_MSB _u(13)
1040-
#define I2C_IC_RAW_INTR_STAT_MASTER_ON_HOLD_LSB _u(13)
1041-
#define I2C_IC_RAW_INTR_STAT_MASTER_ON_HOLD_ACCESS "RO"
1042-
#define I2C_IC_RAW_INTR_STAT_MASTER_ON_HOLD_VALUE_INACTIVE _u(0x0)
1043-
#define I2C_IC_RAW_INTR_STAT_MASTER_ON_HOLD_VALUE_ACTIVE _u(0x1)
1044-
// -----------------------------------------------------------------------------
1045999
// Field : I2C_IC_RAW_INTR_STAT_RESTART_DET
10461000
// Description : Indicates whether a RESTART condition has occurred on the I2C
10471001
// interface when DW_apb_i2c is operating in Slave mode and the
@@ -1839,8 +1793,8 @@
18391793
//
18401794
// The values in this register are in units of ic_clk period. The
18411795
// value programmed in IC_SDA_TX_HOLD must be greater than the
1842-
// minimum hold time in each mode one cycle in master mode, seven
1843-
// cycles in slave mode for the value to be implemented.
1796+
// minimum hold time in each mode (one cycle in master mode, seven
1797+
// cycles in slave mode) for the value to be implemented.
18441798
//
18451799
// The programmed SDA hold time during transmit (IC_SDA_TX_HOLD)
18461800
// cannot exceed at any time the duration of the low part of scl.

src/rp2040/hardware_regs/include/hardware/regs/rosc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@
260260
// -----------------------------------------------------------------------------
261261
// Field : ROSC_STATUS_BADWRITE
262262
// Description : An invalid value has been written to CTRL_ENABLE or
263-
// CTRL_FREQ_RANGE or FREQA or FREQB or DORMANT
263+
// CTRL_FREQ_RANGE or FREQA or FREQB or DIV or PHASE or DORMANT
264264
#define ROSC_STATUS_BADWRITE_RESET _u(0x0)
265265
#define ROSC_STATUS_BADWRITE_BITS _u(0x01000000)
266266
#define ROSC_STATUS_BADWRITE_MSB _u(24)

src/rp2040/hardware_regs/rp2040.svd

Lines changed: 2 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -24673,25 +24673,6 @@
2467324673
<description>I2C Interrupt Status Register\n\n
2467424674
Each bit in this register has a corresponding mask bit in the IC_INTR_MASK register. These bits are cleared by reading the matching interrupt clear register. The unmasked raw versions of these bits are available in the IC_RAW_INTR_STAT register.</description>
2467524675
<fields>
24676-
<field>
24677-
<access>read-only</access>
24678-
<bitRange>[13:13]</bitRange>
24679-
<description>See IC_RAW_INTR_STAT for a detailed description of R_MASTER_ON_HOLD bit.\n\n
24680-
Reset value: 0x0</description>
24681-
<enumeratedValues>
24682-
<enumeratedValue>
24683-
<description>R_MASTER_ON_HOLD interrupt is inactive</description>
24684-
<name>INACTIVE</name>
24685-
<value>0</value>
24686-
</enumeratedValue>
24687-
<enumeratedValue>
24688-
<description>R_MASTER_ON_HOLD interrupt is active</description>
24689-
<name>ACTIVE</name>
24690-
<value>1</value>
24691-
</enumeratedValue>
24692-
</enumeratedValues>
24693-
<name>R_MASTER_ON_HOLD</name>
24694-
</field>
2469524676
<field>
2469624677
<access>read-only</access>
2469724678
<bitRange>[12:12]</bitRange>
@@ -24948,25 +24929,6 @@
2494824929
<description>I2C Interrupt Mask Register.\n\n
2494924930
These bits mask their corresponding interrupt status bits. This register is active low; a value of 0 masks the interrupt, whereas a value of 1 unmasks the interrupt.</description>
2495024931
<fields>
24951-
<field>
24952-
<access>read-only</access>
24953-
<bitRange>[13:13]</bitRange>
24954-
<description>This M_MASTER_ON_HOLD_read_only bit masks the R_MASTER_ON_HOLD interrupt in IC_INTR_STAT register.\n\n
24955-
Reset value: 0x0</description>
24956-
<enumeratedValues>
24957-
<enumeratedValue>
24958-
<description>MASTER_ON_HOLD interrupt is masked</description>
24959-
<name>ENABLED</name>
24960-
<value>0</value>
24961-
</enumeratedValue>
24962-
<enumeratedValue>
24963-
<description>MASTER_ON_HOLD interrupt is unmasked</description>
24964-
<name>DISABLED</name>
24965-
<value>1</value>
24966-
</enumeratedValue>
24967-
</enumeratedValues>
24968-
<name>M_MASTER_ON_HOLD_READ_ONLY</name>
24969-
</field>
2497024932
<field>
2497124933
<access>read-write</access>
2497224934
<bitRange>[12:12]</bitRange>
@@ -25223,25 +25185,6 @@
2522325185
<description>I2C Raw Interrupt Status Register\n\n
2522425186
Unlike the IC_INTR_STAT register, these bits are not masked so they always show the true status of the DW_apb_i2c.</description>
2522525187
<fields>
25226-
<field>
25227-
<access>read-only</access>
25228-
<bitRange>[13:13]</bitRange>
25229-
<description>Indicates whether master is holding the bus and TX FIFO is empty. Enabled only when I2C_DYNAMIC_TAR_UPDATE=1 and IC_EMPTYFIFO_HOLD_MASTER_EN=1.\n\n
25230-
Reset value: 0x0</description>
25231-
<enumeratedValues>
25232-
<enumeratedValue>
25233-
<description>MASTER_ON_HOLD interrupt is inactive</description>
25234-
<name>INACTIVE</name>
25235-
<value>0</value>
25236-
</enumeratedValue>
25237-
<enumeratedValue>
25238-
<description>MASTER_ON_HOLD interrupt is active</description>
25239-
<name>ACTIVE</name>
25240-
<value>1</value>
25241-
</enumeratedValue>
25242-
</enumeratedValues>
25243-
<name>MASTER_ON_HOLD</name>
25244-
</field>
2524525188
<field>
2524625189
<access>read-only</access>
2524725190
<bitRange>[12:12]</bitRange>
@@ -25931,7 +25874,7 @@
2593125874
The bits [15:0] of this register are used to control the hold time of SDA during transmit in both slave and master mode (after SCL goes from HIGH to LOW).\n\n
2593225875
The bits [23:16] of this register are used to extend the SDA transition (if any) whenever SCL is HIGH in the receiver in either master or slave mode.\n\n
2593325876
Writes to this register succeed only when IC_ENABLE[0]=0.\n\n
25934-
The values in this register are in units of ic_clk period. The value programmed in IC_SDA_TX_HOLD must be greater than the minimum hold time in each mode one cycle in master mode, seven cycles in slave mode for the value to be implemented.\n\n
25877+
The values in this register are in units of ic_clk period. The value programmed in IC_SDA_TX_HOLD must be greater than the minimum hold time in each mode (one cycle in master mode, seven cycles in slave mode) for the value to be implemented.\n\n
2593525878
The programmed SDA hold time during transmit (IC_SDA_TX_HOLD) cannot exceed at any time the duration of the low part of scl. Therefore the programmed value cannot be larger than N_SCL_LOW-2, where N_SCL_LOW is the duration of the low part of the scl period measured in ic_clk cycles.</description>
2593625879
<fields>
2593725880
<field>
@@ -29385,7 +29328,7 @@
2938529328
<field>
2938629329
<access>read-write</access>
2938729330
<bitRange>[24:24]</bitRange>
29388-
<description>An invalid value has been written to CTRL_ENABLE or CTRL_FREQ_RANGE or FREQA or FREQB or DORMANT</description>
29331+
<description>An invalid value has been written to CTRL_ENABLE or CTRL_FREQ_RANGE or FREQA or FREQB or DIV or PHASE or DORMANT</description>
2938929332
<modifiedWriteValues>oneToClear</modifiedWriteValues>
2939029333
<name>BADWRITE</name>
2939129334
</field>

0 commit comments

Comments
 (0)