Komunikacja

I2C1 0x40005400

11 rejestrów/klastrów w tym peryferium.

Rejestr: CR1  0x40005400
rw

Control register 1

Bit 31: zarezerwowany31Bit 30: zarezerwowanyBit 29: zarezerwowanyBit 28: zarezerwowany28Bit 27: zarezerwowanyBit 26: zarezerwowanyBit 25: zarezerwowanyBit 24: zarezerwowany24Bit 23: PECENBit 22: ALERTENBit 21: SMBDENBit 20: SMBHEN20Bit 19: GCENBit 18: WUPENBit 17: NOSTRETCHBit 16: SBC16Bit 15: RXDMAENBit 14: TXDMAENBit 13: zarezerwowanyBit 12: ANFOFF12Bit 11: DNFBit 10: DNFBit 9: DNFBit 8: DNF8Bit 7: ERRIEBit 6: TCIEBit 5: STOPIEBit 4: NACKIE4Bit 3: ADDRIEBit 2: RXIEBit 1: TXIEBit 0: PE0
BitSzer.PoleDostępOpis
01PE`rw`Peripheral enable Note: When PE=0, the I2C SCL and SDA lines are released. Internal state machines and status bits are put back to their reset value. When cleared, PE must be kept low for at least 3 APB clock cycles.
11TXIE`rw`TX Interrupt enable
21RXIE`rw`RX Interrupt enable
31ADDRIE`rw`Address match Interrupt enable (slave only)
41NACKIE`rw`Not acknowledge received Interrupt enable
51STOPIE`rw`Stop detection Interrupt enable
61TCIE`rw`Transfer Complete interrupt enable Note: Any of these events generate an interrupt: Transfer Complete (TC) Transfer Complete Reload (TCR)
71ERRIE`rw`Error interrupts enable Note: Any of these errors generate an interrupt: Arbitration Loss (ARLO) Bus Error detection (BERR) Overrun/Underrun (OVR) Timeout detection (TIMEOUT) PEC error detection (PECERR) Alert pin event detection (ALERT)
8–114DNF`rw`Digital noise filter These bits are used to configure the digital noise filter on SDA and SCL input. The digital filter, filters spikes with a length of up to DNF[3:0] * tI2CCLK ... Note: If the analog filter is also enabled, the digital filter is added to the analog filter. This filter can only be programmed when the I2C is disabled (PE = 0).
121ANFOFF`rw`Analog noise filter OFF Note: This bit can only be programmed when the I2C is disabled (PE = 0).
141TXDMAEN`rw`DMA transmission requests enable
151RXDMAEN`rw`DMA reception requests enable
161SBC`rw`Slave byte control This bit is used to enable hardware byte control in slave mode.
171NOSTRETCH`rw`Clock stretching disable This bit is used to disable clock stretching in slave mode. It must be kept cleared in master mode. Note: This bit can only be programmed when the I2C is disabled (PE = 0).
181WUPEN`rw`Wakeup from Stop mode enable Note: If the Wakeup from Stop mode feature is not supported, this bit is reserved and forced by hardware to '0'. Refer to . Note: WUPEN can be set only when DNF = '0000'
191GCEN`rw`General call enable
201SMBHEN`rw`SMBus Host Address enable Note: If the SMBus feature is not supported, this bit is reserved and forced by hardware to '0'. Refer to .
211SMBDEN`rw`SMBus Device Default Address enable Note: If the SMBus feature is not supported, this bit is reserved and forced by hardware to '0'. Refer to .
221ALERTEN`rw`SMBus alert enable Note: When ALERTEN=0, the SMBA pin can be used as a standard GPIO. If the SMBus feature is not supported, this bit is reserved and forced by hardware to '0'. Refer to .
231PECEN`rw`PEC enable Note: If the SMBus feature is not supported, this bit is reserved and forced by hardware to '0'. Refer to .
Rejestr: CR2  0x40005404
rw

Control register 2

Bit 31: zarezerwowany31Bit 30: zarezerwowanyBit 29: zarezerwowanyBit 28: zarezerwowany28Bit 27: zarezerwowanyBit 26: PECBYTEBit 25: AUTOENDBit 24: RELOAD24Bit 23: NBYTESBit 22: NBYTESBit 21: NBYTESBit 20: NBYTES20Bit 19: NBYTESBit 18: NBYTESBit 17: NBYTESBit 16: NBYTES16Bit 15: NACKBit 14: STOPBit 13: STARTBit 12: HEAD10R12Bit 11: ADD10Bit 10: RD_WRNBit 9: SADDBit 8: SADD8Bit 7: SADDBit 6: SADDBit 5: SADDBit 4: SADD4Bit 3: SADDBit 2: SADDBit 1: SADDBit 0: SADD0
BitSzer.PoleDostępOpis
0–910SADD`rw`Slave address (master mode) In 7-bit addressing mode (ADD10 = 0): SADD[7:1] should be written with the 7-bit slave address to be sent. The bits SADD[9], SADD[8] and SADD[0] are don't care. In 10-bit addressing mode (ADD10 = 1): SADD[9:0] should be written with the 10-bit slave address to be sent. Note: Changing these bits when the START bit is set is not allowed.
101RD_WRN`rw`Transfer direction (master mode) Note: Changing this bit when the START bit is set is not allowed.
111ADD10`rw`10-bit addressing mode (master mode) Note: Changing this bit when the START bit is set is not allowed.
121HEAD10R`rw`10-bit address header only read direction (master receiver mode) Note: Changing this bit when the START bit is set is not allowed.
131START`rw`Start generation This bit is set by software, and cleared by hardware after the Start followed by the address sequence is sent, by an arbitration loss, by a timeout error detection, or when PE = 0. It can also be cleared by software by writing '1' to the ADDRCF bit in the I2C_ICR register. If the I2C is already in master mode with AUTOEND = 0, setting this bit generates a Repeated Start condition when RELOAD=0, after the end of the NBYTES transfer. Otherwise setting this bit generates a START condition once the bus is free. Note: Writing '0' to this bit has no effect. The START bit can be set even if the bus is BUSY or I2C is in slave mode. This bit has no effect when RELOAD is set.
141STOP`rw`Stop generation (master mode) The bit is set by software, cleared by hardware when a STOP condition is detected, or when PE = 0. In Master Mode: Note: Writing '0' to this bit has no effect.
151NACK`rw`NACK generation (slave mode) The bit is set by software, cleared by hardware when the NACK is sent, or when a STOP condition or an Address matched is received, or when PE=0. Note: Writing '0' to this bit has no effect. This bit is used in slave mode only: in master receiver mode, NACK is automatically generated after last byte preceding STOP or RESTART condition, whatever the NACK bit value. When an overrun occurs in slave receiver NOSTRETCH mode, a NACK is automatically generated whatever the NACK bit value. When hardware PEC checking is enabled (PECBYTE=1), the PEC acknowledge value does not depend on the NACK value.
16–238NBYTES`rw`Number of bytes The number of bytes to be transmitted/received is programmed there. This field is don't care in slave mode with SBC=0. Note: Changing these bits when the START bit is set is not allowed.
241RELOAD`rw`NBYTES reload mode This bit is set and cleared by software.
251AUTOEND`rw`Automatic end mode (master mode) This bit is set and cleared by software. Note: This bit has no effect in slave mode or when the RELOAD bit is set.
261PECBYTE`rw`Packet error checking byte This bit is set by software, and cleared by hardware when the PEC is transferred, or when a STOP condition or an Address matched is received, also when PE=0. Note: Writing '0' to this bit has no effect. This bit has no effect when RELOAD is set. This bit has no effect is slave mode when SBC=0. If the SMBus feature is not supported, this bit is reserved and forced by hardware to '0'. Refer to .
Rejestr: OAR1  0x40005408
rw

Own address register 1

Bit 31: zarezerwowany31Bit 30: zarezerwowanyBit 29: zarezerwowanyBit 28: zarezerwowany28Bit 27: zarezerwowanyBit 26: zarezerwowanyBit 25: zarezerwowanyBit 24: zarezerwowany24Bit 23: zarezerwowanyBit 22: zarezerwowanyBit 21: zarezerwowanyBit 20: zarezerwowany20Bit 19: zarezerwowanyBit 18: zarezerwowanyBit 17: zarezerwowanyBit 16: zarezerwowany16Bit 15: OA1ENBit 14: zarezerwowanyBit 13: zarezerwowanyBit 12: zarezerwowany12Bit 11: zarezerwowanyBit 10: OA1MODEBit 9: OA1Bit 8: OA18Bit 7: OA1Bit 6: OA1Bit 5: OA1Bit 4: OA14Bit 3: OA1Bit 2: OA1Bit 1: OA1Bit 0: OA10
BitSzer.PoleDostępOpis
0–910OA1`rw`Interface own slave address 7-bit addressing mode: OA1[7:1] contains the 7-bit own slave address. The bits OA1[9], OA1[8] and OA1[0] are don't care. 10-bit addressing mode: OA1[9:0] contains the 10-bit own slave address. Note: These bits can be written only when OA1EN=0.
101OA1MODE`rw`Own Address 1 10-bit mode Note: This bit can be written only when OA1EN=0.
151OA1EN`rw`Own Address 1 enable
Rejestr: OAR2  0x4000540C
rw

Own address register 2

Bit 31: zarezerwowany31Bit 30: zarezerwowanyBit 29: zarezerwowanyBit 28: zarezerwowany28Bit 27: zarezerwowanyBit 26: zarezerwowanyBit 25: zarezerwowanyBit 24: zarezerwowany24Bit 23: zarezerwowanyBit 22: zarezerwowanyBit 21: zarezerwowanyBit 20: zarezerwowany20Bit 19: zarezerwowanyBit 18: zarezerwowanyBit 17: zarezerwowanyBit 16: zarezerwowany16Bit 15: OA2ENBit 14: zarezerwowanyBit 13: zarezerwowanyBit 12: zarezerwowany12Bit 11: zarezerwowanyBit 10: OA2MSKBit 9: OA2MSKBit 8: OA2MSK8Bit 7: OA2Bit 6: OA2Bit 5: OA2Bit 4: OA24Bit 3: OA2Bit 2: OA2Bit 1: OA2Bit 0: zarezerwowany0
BitSzer.PoleDostępOpis
1–77OA2`rw`Interface address 7-bit addressing mode: 7-bit address Note: These bits can be written only when OA2EN=0.
8–103OA2MSK`rw`Own Address 2 masks Note: These bits can be written only when OA2EN=0. As soon as OA2MSK is not equal to 0, the reserved I2C addresses (0b0000xxx and 0b1111xxx) are not acknowledged even if the comparison matches.
151OA2EN`rw`Own Address 2 enable
Rejestr: TIMINGR  0x40005410
rw

Timing register

Bit 31: PRESC:31Bit 30: PRESC:Bit 29: PRESC:Bit 28: PRESC:28Bit 27: zarezerwowanyBit 26: zarezerwowanyBit 25: zarezerwowanyBit 24: zarezerwowany24Bit 23: SCLDEL:Bit 22: SCLDEL:Bit 21: SCLDEL:Bit 20: SCLDEL:20Bit 19: SDADEL:Bit 18: SDADEL:Bit 17: SDADEL:Bit 16: SDADEL:16Bit 15: SCLH:Bit 14: SCLH:Bit 13: SCLH:Bit 12: SCLH:12Bit 11: SCLH:Bit 10: SCLH:Bit 9: SCLH:Bit 8: SCLH:8Bit 7: SCLL:Bit 6: SCLL:Bit 5: SCLL:Bit 4: SCLL:4Bit 3: SCLL:Bit 2: SCLL:Bit 1: SCLL:Bit 0: SCLL:0
BitSzer.PoleDostępOpis
0–78SCLL:SCL low period (master mode)
8–158SCLH:SCL high period (master mode)
16–194SDADEL:Data hold time
20–234SCLDEL:Data setup time
28–314PRESC:Timing prescaler
Rejestr: TIMEOUTR  0x40005414
rw

Status register 1

Bit 31: TEXTEN31Bit 30: zarezerwowanyBit 29: zarezerwowanyBit 28: zarezerwowany28Bit 27: TIMEOUTBBit 26: TIMEOUTBBit 25: TIMEOUTBBit 24: TIMEOUTB24Bit 23: TIMEOUTBBit 22: TIMEOUTBBit 21: TIMEOUTBBit 20: TIMEOUTB20Bit 19: TIMEOUTBBit 18: TIMEOUTBBit 17: TIMEOUTBBit 16: TIMEOUTB16Bit 15: TIMOUTENBit 14: zarezerwowanyBit 13: zarezerwowanyBit 12: TIDLE12Bit 11: TIMEOUTABit 10: TIMEOUTABit 9: TIMEOUTABit 8: TIMEOUTA8Bit 7: TIMEOUTABit 6: TIMEOUTABit 5: TIMEOUTABit 4: TIMEOUTA4Bit 3: TIMEOUTABit 2: TIMEOUTABit 1: TIMEOUTABit 0: TIMEOUTA0
BitSzer.PoleDostępOpis
0–1112TIMEOUTA`rw`Bus Timeout A This field is used to configure: The SCL low timeout condition tTIMEOUT when TIDLE=0 tTIMEOUT= (TIMEOUTA+1) x 2048 x tI2CCLK The bus idle condition (both SCL and SDA high) when TIDLE=1 tIDLE= (TIMEOUTA+1) x 4 x tI2CCLK Note: These bits can be written only when TIMOUTEN=0.
121TIDLE`rw`Idle clock timeout detection Note: This bit can be written only when TIMOUTEN=0.
151TIMOUTEN`rw`Clock timeout enable
16–2712TIMEOUTB`rw`Bus timeout B This field is used to configure the cumulative clock extension timeout: In master mode, the master cumulative clock low extend time (tLOW:MEXT) is detected In slave mode, the slave cumulative clock low extend time (tLOW:SEXT) is detected tLOW:EXT= (TIMEOUTB+1) x 2048 x tI2CCLK Note: These bits can be written only when TEXTEN=0.
311TEXTEN`rw`Extended clock timeout enable
Rejestr: ISR:  0x40005418

Interrupt and Status register

Bit 31: zarezerwowany31Bit 30: zarezerwowanyBit 29: zarezerwowanyBit 28: zarezerwowany28Bit 27: zarezerwowanyBit 26: zarezerwowanyBit 25: zarezerwowanyBit 24: zarezerwowany24Bit 23: ADDCODEBit 22: ADDCODEBit 21: ADDCODEBit 20: ADDCODE20Bit 19: ADDCODEBit 18: ADDCODEBit 17: ADDCODEBit 16: DIR16Bit 15: BUSYBit 14: zarezerwowanyBit 13: ALERTBit 12: TIMEOUT12Bit 11: PECERRBit 10: OVRBit 9: ARLOBit 8: BERR8Bit 7: TCRBit 6: TCBit 5: STOPFBit 4: NACKF4Bit 3: ADDRBit 2: RXNEBit 1: TXISBit 0: TXE0
BitSzer.PoleDostępOpis
01TXE`rw`Transmit data register empty (transmitters)
11TXIS`rw`Transmit interrupt status (transmitters)
21RXNE`ro`Receive data register not empty (receivers)
31ADDR`ro`Address matched (slave mode)
41NACKF`ro`Not acknowledge received flag
51STOPF`ro`Stop detection flag
61TC`ro`Transfer Complete (master mode)
71TCR`ro`Transfer Complete Reload
81BERR`ro`Bus error
91ARLO`ro`Arbitration lost
101OVR`ro`Overrun/Underrun (slave mode)
111PECERR`ro`PEC Error in reception
121TIMEOUT`ro`Timeout or t_low detection flag
131ALERT`ro`SMBus alert
151BUSY`ro`Bus busy
161DIR`ro`Transfer direction (Slave mode) This flag is updated when an address match event occurs (ADDR=1).
17–237ADDCODE`ro`Address match code (Slave mode)
Rejestr: ICR  0x4000541C
wo

Interrupt clear register

Bit 31: zarezerwowany31Bit 30: zarezerwowanyBit 29: zarezerwowanyBit 28: zarezerwowany28Bit 27: zarezerwowanyBit 26: zarezerwowanyBit 25: zarezerwowanyBit 24: zarezerwowany24Bit 23: zarezerwowanyBit 22: zarezerwowanyBit 21: zarezerwowanyBit 20: zarezerwowany20Bit 19: zarezerwowanyBit 18: zarezerwowanyBit 17: zarezerwowanyBit 16: zarezerwowany16Bit 15: zarezerwowanyBit 14: zarezerwowanyBit 13: ALERTCF:Bit 12: TIMOUTCF:12Bit 11: PECCF:Bit 10: OVRCF:Bit 9: ARLOCF:Bit 8: BERRCF:8Bit 7: zarezerwowanyBit 6: zarezerwowanyBit 5: STOPCF:Bit 4: NACKCF:4Bit 3: ADDRCF:Bit 2: zarezerwowanyBit 1: zarezerwowanyBit 0: zarezerwowany0
BitSzer.PoleDostępOpis
31ADDRCF:Address Matched flag clear
41NACKCF:Not Acknowledge flag clear
51STOPCF:Stop detection flag clear
81BERRCF:Bus error flag clear
91ARLOCF:Arbitration lost flag clear
101OVRCF:Overrun/Underrun flag clear
111PECCF:PEC Error flag clear
121TIMOUTCF:Timeout detection flag clear
131ALERTCF:Alert flag clear
Rejestr: PECR  0x40005420
ro

PEC register

Bit 31: zarezerwowany31Bit 30: zarezerwowanyBit 29: zarezerwowanyBit 28: zarezerwowany28Bit 27: zarezerwowanyBit 26: zarezerwowanyBit 25: zarezerwowanyBit 24: zarezerwowany24Bit 23: zarezerwowanyBit 22: zarezerwowanyBit 21: zarezerwowanyBit 20: zarezerwowany20Bit 19: zarezerwowanyBit 18: zarezerwowanyBit 17: zarezerwowanyBit 16: zarezerwowany16Bit 15: zarezerwowanyBit 14: zarezerwowanyBit 13: zarezerwowanyBit 12: zarezerwowany12Bit 11: zarezerwowanyBit 10: zarezerwowanyBit 9: zarezerwowanyBit 8: zarezerwowany8Bit 7: PEC:Bit 6: PEC:Bit 5: PEC:Bit 4: PEC:4Bit 3: PEC:Bit 2: PEC:Bit 1: PEC:Bit 0: PEC:0
BitSzer.PoleDostępOpis
0–78PEC:Packet error checking register
Rejestr: RXDR  0x40005424
ro

Receive data register

Bit 31: zarezerwowany31Bit 30: zarezerwowanyBit 29: zarezerwowanyBit 28: zarezerwowany28Bit 27: zarezerwowanyBit 26: zarezerwowanyBit 25: zarezerwowanyBit 24: zarezerwowany24Bit 23: zarezerwowanyBit 22: zarezerwowanyBit 21: zarezerwowanyBit 20: zarezerwowany20Bit 19: zarezerwowanyBit 18: zarezerwowanyBit 17: zarezerwowanyBit 16: zarezerwowany16Bit 15: zarezerwowanyBit 14: zarezerwowanyBit 13: zarezerwowanyBit 12: zarezerwowany12Bit 11: zarezerwowanyBit 10: zarezerwowanyBit 9: zarezerwowanyBit 8: zarezerwowany8Bit 7: RXDATA:Bit 6: RXDATA:Bit 5: RXDATA:Bit 4: RXDATA:4Bit 3: RXDATA:Bit 2: RXDATA:Bit 1: RXDATA:Bit 0: RXDATA:0
BitSzer.PoleDostępOpis
0–78RXDATA:8-bit receive data
Rejestr: TXDR  0x40005428
rw

Transmit data register

Bit 31: zarezerwowany31Bit 30: zarezerwowanyBit 29: zarezerwowanyBit 28: zarezerwowany28Bit 27: zarezerwowanyBit 26: zarezerwowanyBit 25: zarezerwowanyBit 24: zarezerwowany24Bit 23: zarezerwowanyBit 22: zarezerwowanyBit 21: zarezerwowanyBit 20: zarezerwowany20Bit 19: zarezerwowanyBit 18: zarezerwowanyBit 17: zarezerwowanyBit 16: zarezerwowany16Bit 15: zarezerwowanyBit 14: zarezerwowanyBit 13: zarezerwowanyBit 12: zarezerwowany12Bit 11: zarezerwowanyBit 10: zarezerwowanyBit 9: zarezerwowanyBit 8: zarezerwowany8Bit 7: TXDATA:Bit 6: TXDATA:Bit 5: TXDATA:Bit 4: TXDATA:4Bit 3: TXDATA:Bit 2: TXDATA:Bit 1: TXDATA:Bit 0: TXDATA:0
BitSzer.PoleDostępOpis
0–78TXDATA:8-bit transmit data