Showing content from https://stm32-rs.github.io/stm32-rs/stm32wb06.svd.patched below:
STM32WB06 1.0 STM32WB06 CM0+ r0p0 little true false 2 false 8 32 0x20 0x00000000 0xFFFFFFFF ADC ADC address block description ADC 0x41006000 0x0 0x400 registers ADC ADC interrupt 12 VERSION_ID VERSION_ID VERSION_ID register 0x0 0x20 read-only 0x00000020 VERSION_ID version of the embedded IP. 0 8 CONF CONF ADC configuration register 0x4 0x20 read-write 0x00020002 VBIAS_PRECH_FORCE possibility to keep the VBIAS_PRECH enabled to deactivate the filter 20 1 ADC_CONT_1V2 select the input sampling method 19 1 BIT_INVERT_DIFF invert bit to bit the ADC data output when a differential 18 1 BIT_INVERT_SN invert bit to bit the ADC data output when a single 17 1 OVR_DF_CFG decimation overrun configuration 16 1 OVR_DS_CFG Down Sampler overrun configuration 15 1 DMA_DF_ENA enable DMA mode for Decimation Filter data path 14 1 DMA_DS_ENA enable DMA mode for Down Sampler data path 13 1 SAMPLE_RATE conversion rate of ADC 11 2 OP_MODE ADC mode selection (= data path selection) 7 2 SMPS_SYNCHRO_ENA synchronize the ADC start conversion with a pulse generated by the 6 1 SEQ_LEN number of conversions in a regular sequence 2 4 SEQUENCE enable the sequence mode (active by default) 1 1 CONT regular sequence runs continuously when ADC mode is enabled 0 1 CTRL CTRL ADC control register 0x8 0x20 read-write 0x00000000 ADC_LDO_ENA enable the LDO associated to the ADC block 5 1 TEST_MODE select the functional or the test mode of the ADC 4 1 DIG_AUD_MODE enable the digital audio mode (the data path uses the decimation filter) 3 1 STOP_OP_MOD stop the on-going OP_MODE (ADC mode, Analog audio mode, Full 2 1 START_CON generate a start pulse to initiate an ADC conversion 1 1 ADC_ON_OFF ADC_ON_OFF: â 0: power off the ADC â 1: power on the ADC 0 1 OCM_CTRL OCM_CTRL Occasionnal mode control register 0xC 0x20 read-write 0x00000000 OCM_ENA start occasional conversion in analog audio and full modes 1 1 OCM_SRC select the occasional conversion source 0 1 PGA_CONF PGA_CONF PGA configuration register 0x10 0x20 read-write 0x00000000 PGA_BIAS set the microphone bias voltage 4 3 PGA_GAIN from 6 to 30 dB 0 4 SWITCH SWITCH ADC switch control for Input Selection 0x14 0x20 read-write 0x00000000 SE_VIN_7 input voltage for VINP[3] 14 2 SE_VIN_6 input voltage for VINP[2] 12 2 SE_VIN_5 input voltage for VINP[1] 10 2 SE_VIN_4 input voltage for VINP[0] 8 2 SE_VIN_3 input voltage for VINM[3] / VINP[3]-VINM[3] 6 2 SE_VIN_2 input voltage for VINM[2] / VINP[2]-VINM[2] 4 2 SE_VIN_1 input voltage for VINM[1] / VINP[1]-VINM[1] 2 2 SE_VIN_0 input voltage for VINM[0] / VINP[0]-VINM[0] 0 2 DF_CONF DF_CONF Decimation filter configuration register 0x18 0x20 read-write 0x00003015 DF_HALF_D_EN half dynamic enable. 17 1 DF_HPF_EN high pass filter enable. 16 1 DF_MICROL_RN left/right channel selection on digital microphone 15 1 PDM_RATE select the PDM clock rate. 11 4 DF_O_S2U select signed/unsigned format for data output 10 1 DF_I_U2S select signed/unsigned format for input 9 1 DF_ITP1P2 1.2 fractional interpolator enable 8 1 DF_CIC_DHF CIC filter decimator half factor 7 1 DF_CIC_DEC_FACTOR 0 7 DS_CONF DS_CONF Downsampler configuration register 0x1C 0x20 read-write 0x00000000 DS_WIDTH program the Down Sampler width of data output (DSDTATA) 3 3 DS_RATIO program the Down Sampler ratio (N factor) 0 3 SEQ_1 SEQ_1 ADC regular sequence configuration register 1 0x20 0x20 read-write 0x00000000 SEQ7 channel number code for 8th conversion of the sequence. 28 4 SEQ6 channel number code for 7th conversion of the sequence. 24 4 SEQ5 channel number code for 6th conversion of the sequence. 20 4 SEQ4 channel number code for 5th conversion of the sequence. 16 4 SEQ3 channel number code for 4th conversion of the sequence. 12 4 SEQ2 channel number code for 3rd conversion of the sequence. 8 4 SEQ1 channel number code for second conversion of the sequence. 4 4 SEQ0 channel number code for first conversion of the sequence 0 4 SEQ_2 SEQ_2 ADC regular sequence configuration register 2 0x24 0x20 read-write 0x00000000 SEQ15 channel number code for 16th conversion of the sequence. 28 4 SEQ14 channel number code for 15th conversion of the sequence. 24 4 SEQ13 channel number code for 14th conversion of the sequence. 20 4 SEQ12 channel number code for 13th conversion of the sequence. 16 4 SEQ11 channel number code for 12th conversion of the sequence. 12 4 SEQ10 channel number code for 11th conversion of the sequence. 8 4 SEQ9 channel number code for 10th conversion of the sequence. 4 4 SEQ8 channel number code for 9th conversion of the sequence 0 4 COMP_1 COMP_1 ADC Gain and offset correction values register 1 0x28 0x20 read-write 0x00000555 OFFSET1 first calibration point: signed offset compensation[6:0] 12 7 GAIN1 first calibration point: gain AUXADC_GAIN_1V2[11:0] 0 12 COMP_2 COMP_2 ADC Gain and offset correction values register 2 0x2C 0x20 read-write 0x00000555 OFFSET2 second calibration point: signed offset compensation[6:0] 12 7 GAIN2 second calibration point: gain AUXADC_GAIN_1V2[11:0] 0 12 COMP_3 COMP_3 ADC Gain and offset correction values register 3 0x30 0x20 read-write 0x00000555 OFFSET3 third calibration point: signed offset compensation[6:0] 12 7 GAIN3 third calibration point: gain AUXADC_GAIN_1V2[11:0] 0 12 COMP_4 COMP_4 ADC Gain and offset correction values register 4 0x34 0x20 read-write 0x00000555 OFFSET4 fourth calibration point: signed offset compensation[6:0] 12 7 GAIN4 fourth calibration point: gain AUXADC_GAIN_1V2[11:0] 0 12 COMP_SEL COMP_SEL ADC Gain and Offset selection values register 0x38 0x20 read-write 0x00000000 GAIN_OFFSET8 gain / offset used in ADC differential mode with Vinput range = 3.6V 16 2 GAIN_OFFSET7 gain / offset used in ADC single positive mode with Vinput range = 3.6V 14 2 GAIN_OFFSET6 gain / offset used in ADC single negative mode with Vinput range = 3.6V 12 2 GAIN_OFFSET5 gain / offset used in ADC differential mode with Vinput range = 2.4V 10 2 GAIN_OFFSET4 gain / offset used in ADC single positive mode with Vinput range = 2.4V 8 2 GAIN_OFFSET3 gain / offset used in ADC single negative mode with Vinput range = 2.4V 6 2 GAIN_OFFSET2 gain / offset used in ADC differential mode with Vinput range = 1.2V 4 2 GAIN_OFFSET1 gain / offset used in ADC single positive mode with Vinput range = 1.2V 2 2 GAIN_OFFSET0 gain / offset used in ADC single negative mode with Vinput range = 1.2V 0 2 WD_TH WD_TH High/low limits for event monitoring a channel register 0x3C 0x20 read-write 0x0FFF0000 WD_HT analog watchdog high level threshold. 16 12 WD_LT analog watchdog low level threshold. 0 12 WD_CONF WD_CONF Channel selection for event monitoring register 0x40 0x20 read-write 0x00000000 AWD_CHX analog watchdog channel selection to define which input channel(s) need to be guarded by the watchdog. 0 16 DS_DATAOUT DS_DATAOUT Downsampler Data output register 0x44 0x20 read-only 0x00000000 DS_DATA contain the converted data at the output of the Down Sampler 0 16 DF_DATAOUT DF_DATAOUT Decimation filter Data output register 0x48 0x20 read-only 0x00000000 DF_DATA contain the converted data at the output of the decimation filter. 0 16 IRQ_STATUS IRQ_STATUS Interrupt Status register 0x4C 0x20 read-write 0x00000000 DF_OVRFL_IRQ set to indicate the decimation filter is saturated. 7 1 OVR_DF_IRQ set to indicate a decimation filter overrun (a data is lost) 6 1 OVR_DS_IRQ set to indicate a Down Sampler overrun (at least one data is lost) 5 1 AWD_IRQ set when an analog watchdog event occurs 4 1 EOS_IRQ set when a sequence of conversion is completed 3 1 EODF_IRQ set when the decimation filter conversion is completed 2 1 EODS_IRQ set when the Down Sampler conversion is completed. 1 1 EOC_IRQ (Used in test mode only): set when the ADC conversion is completed. 0 1 IRQ_ENABLE IRQ_ENABLE Enable/disable Interrupts 0x50 0x20 read-write 0x00000000 DF_OVRFL_IRQ_ENA decimation filter saturation interrupt enable 7 1 OVR_DF_IRQ_ENA decimation filter overrun interrupt enable 6 1 OVR_DS_IRQ_ENA Down Sampler overrun interrupt enable 5 1 AWD_IRQ_ENA analog watchdog interrupt enable 4 1 EOS_IRQ_ENA End of regular sequence interrupt enable 3 1 EODF_IRQ_ENA End of conversion interrupt enable for the decimation filter output 2 1 EODS_IRQ_ENA End of conversion interrupt enable for the Down Sampler output 1 1 EOC_IRQ_ENA (Used in test mode only): End of ADC conversion interrupt enable 0 1 TIMER_CONF TIMER_CONF Time to add after an LDO Enable or ADC Enable to let the HW to be stable before using it 0x54 0x20 read-write 0x00009628 PRECH_DELAY_SEL Select the time step PD_STEP for the VBIAS_PRECH_DELAY timer 16 1 VBIAS_PRECH_DELAY define the duration of a waiting time starting at rising edge of PGA_EN signal and corresponding to the VBIAS precharge duration 8 8 ADC_LDO_DELAY define the duration of a waiting time to be inserted between the ADC_LDO enable and the ADC ON to let time to the LDO to stabilize before starting a conversion. 0 8 CRC CRC address block description CRC 0x48200000 0x0 0x400 registers DR DR CRC data register 0x0 0x20 read-write 0xFFFFFFFF 0xFFFFFFFF DR Data register bits This register is used to write new data to the CRC calculator. It holds the previous CRC calculation result when it is read. If the data size is less than 32 bits, the least significant bits are used to write/read the correct value. 0 32 read-write 0 4294967295 DR8 Data register - byte sized DR 0x0 0x8 read-write 0x000000FF DR8 Data register bits 0 8 0 255 DR16 Data register - half-word sized DR 0x0 0x10 read-write 0x0000FFFF DR16 Data register bits 0 16 0 65535 IDR IDR CRC independent data register 0x4 0x20 read-write 0x00000000 0xFFFFFFFF IDR General-purpose 32-bit data register bits These bits can be used as a temporary storage location for four bytes. This register is not affected by CRC resets generated by the RESET bit in the CRC_CR register 0 32 read-write 0 4294967295 CR CR CRC control register 0x8 0x20 read-write 0x00000000 0xFFFFFFFF RESET RESET bit This bit is set by software to reset the CRC calculation unit and set the data register to the value stored in the CRC_INIT register. This bit can only be set, it is automatically cleared by hardware 0 1 read-write RESETW write Reset Resets the CRC calculation unit and sets the data register to 0xFFFF FFFF 1 POLYSIZE Polynomial size These bits control the size of the polynomial. 3 2 read-write POLYSIZE Polysize32 32-bit polynomial 0 Polysize16 16-bit polynomial 1 Polysize8 8-bit polynomial 2 Polysize7 7-bit polynomial 3 REV_IN Reverse input data This bitfield controls the reversal of the bit order of the input data 5 2 read-write REV_IN Normal Bit order not affected 0 Byte Bit reversal done by byte 1 HalfWord Bit reversal done by half-word 2 Word Bit reversal done by word 3 REV_OUT Reverse output data This bit controls the reversal of the bit order of the output data. 7 1 read-write REV_OUT Normal Bit order not affected 0 Reversed Bit reversed output 1 INIT INIT CRC initial value 0x10 0x20 read-write 0xFFFFFFFF 0xFFFFFFFF INIT Programmable initial CRC value This register is used to write the CRC initial value. 0 32 read-write 0 4294967295 POL POL CRC polynomial 0x14 0x20 read-write 0x04C11DB7 0xFFFFFFFF POL Programmable polynomial This register is used to write the coefficients of the polynomial to be used for CRC calculation. If the polynomial size is less than 32 bits, the least significant bits have to be used to program the correct value. 0 32 read-write 0 4294967295 DMA DMA 0x48700000 0x0 0xA4 registers DMA DMA interrupt 17 ISR ISR DMA_ISR register 0x0 0x20 read-only 0x00000000 8 0x4 1-8 GIF%s Channel %s Global interrupt flag 0 1 read-only GIF1 NoEvent No transfer error, half event, complete event 0 Event A transfer error, half event or complete event has occured 1 8 0x4 1-8 TCIF%s Channel %s Transfer Complete flag 1 1 read-only TCIF1 NotComplete No transfer complete event 0 Complete A transfer complete event has occured 1 8 0x4 1-8 HTIF%s Channel %s Half Transfer Complete flag 2 1 read-only HTIF1 NotHalf No half transfer event 0 Half A half transfer event has occured 1 8 0x4 1-8 TEIF%s Channel %s Transfer Error flag 3 1 read-only TEIF1 NoError No transfer error 0 Error A transfer error has occured 1 IFCR IFCR DMA_IFCR register 0x4 0x20 write-only 0x00000000 8 0x4 1-8 CGIF%s Channel %s Global interrupt clear 0 1 write-only CGIF1 Clear Clears the GIF, TEIF, HTIF, TCIF flags in the ISR register 1 8 0x4 1-8 CTCIF%s Channel %s Transfer Complete clear 1 1 write-only CTCIF1 Clear Clears the TCIF flag in the ISR register 1 8 0x4 1-8 CHTIF%s Channel %s Half Transfer clear 2 1 write-only CHTIF1 Clear Clears the HTIF flag in the ISR register 1 8 0x4 1-8 CTEIF%s Channel %s Transfer Error clear 3 1 write-only CTEIF1 Clear Clears the TEIF flag in the ISR register 1 8 0x14 1-8 CH%s Channel cluster: CCR?, CNDTR?, CPAR?, and CMAR? registers 0x8 CR CCR1 DMA_CCRx register 0x0 0x20 read-write 0x00000000 EN EN: Channel enable This bit is set and cleared by software. 0: Channel disabled 1: Channel enabled 0 1 read-write EN Disabled Channel disabled 0 Enabled Channel enabled 1 TCIE TCIE: Transfer complete interrupt enable This bit is set and cleared by software. 0: TC interrupt disabled 1: TC interrupt enabled 1 1 read-write TCIE Disabled Transfer Complete interrupt disabled 0 Enabled Transfer Complete interrupt enabled 1 HTIE HTIE: Half transfer interrupt enable This bit is set and cleared by software. 0: HT interrupt disabled 1: HT interrupt enabled 2 1 read-write HTIE Disabled Half Transfer interrupt disabled 0 Enabled Half Transfer interrupt enabled 1 TEIE TEIE: Transfer error interrupt enable This bit is set and cleared by software. 0: TE interrupt disabled 1: TE interrupt enabled 3 1 read-write TEIE Disabled Transfer Error interrupt disabled 0 Enabled Transfer Error interrupt enabled 1 DIR DIR: Data transfer direction This bit is set and cleared by software. 0: Read from peripheral 1: Read from memory 4 1 read-write DIR FromPeripheral Read from peripheral 0 FromMemory Read from memory 1 CIRC CIRC: Circular mode This bit is set and cleared by software. 0: Circular mode disabled 1: Circular mode enabled 5 1 read-write CIRC Disabled Circular buffer disabled 0 Enabled Circular buffer enabled 1 PINC PINC: Peripheral increment mode This bit is set and cleared by software. 0: Peripheral increment mode disabled 1: Peripheral increment mode enabled 6 1 read-write PINC Disabled Increment mode disabled 0 Enabled Increment mode enabled 1 MINC MINC: Memory increment mode This bit is set and cleared by software. 0: Memory increment mode disabled 1: Memory increment mode enabled 7 1 read-write PSIZE PSIZE[1:0]: Peripheral size These bits are set and cleared by software. 00: 8-bits 01: 16-bits 10: 32-bits 8 2 read-write PSIZE Bits8 8-bit size 0 Bits16 16-bit size 1 Bits32 32-bit size 2 MSIZE MSIZE[1:0]: Memory size These bits are set and cleared by software. 00: 8-bits 01: 16-bits 10: 32-bits 10 2 read-write PL PL[1:0]: Channel priority level These bits are set and cleared by software. 00: Low 01: Medium 10: High 11: Very high 12 2 read-write PL Low Low priority 0 Medium Medium priority 1 High High priority 2 VeryHigh Very high priority 3 MEM2MEM MEM2MEM: Memory to memory mode This bit is set and cleared by software. 0: Memory to memory mode disabled 1: Memory to memory mode enabled 14 1 read-write MEM2MEM Disabled Memory to memory mode disabled 0 Enabled Memory to memory mode enabled 1 NDTR CNDTR1 DMA_CNDTRx register 0x4 0x20 read-write 0x00000000 NDT NDT[15:0]: Number of data to transfer Number of data to be transferred (0 up to 65535). This register can only be written when the channel is disabled. Once the channel is enabled, this register is read-only, indicating the remaining bytes to be transmitted. This register decrements after each DMA transfer. Once the transfer is completed, this register can either stay at zero or be reloaded automatically by the value previously programmed if the channel is configured in auto-reload mode. If this register is zero, no transaction can be served whether the channel is enabled or not. 0 16 read-write 0 65535 PAR CPAR1 DMA_CPARx register 0x8 0x20 read-write 0x00000000 PA PA[31:0]: Peripheral address Base address of the peripheral data register from/to which the data will be read/written. When PSIZE is 01 (16-bit), the PA[0] bit is ignored. Access is automatically aligned to a halfword address. When PSIZE is 10 (32-bit), PA[1:0] are ignored. Access is automatically aligned to a word address. 0 32 read-write MAR CMAR1 DMA_CMARx register 0xC 0x20 read-write 0x00000000 MA MA[31:0]: Memory address Base address of the memory area from/to which the data will be read/written. When MSIZE is 01 (16-bit), the MA[0] bit is ignored. Access is automatically aligned to a halfword address. When MSIZE is 10 (32-bit), MA[1:0] are ignored. Access is automatically aligned to a word address. 0 32 read-write DMAMUX DMAMUX 0x48800000 0x0 0x20 registers 8 0x4 0-7 C%sCR C%sCR CxCR register 0x0 0x20 read-write 0x00000000 0x0000000F DMAREQ_ID DMAREQ_ID[4:0]: DMA REQuest IDentification Selects the input DMA request. C.f. the DMAMUX table about assignments of multiplexer inputs to resources. 0 5 read-write DMAREQ_ID Spi3Rx SPI3_RX 2 Spi3Tx SPI3_TX 3 Spi1Rx SPI1_RX 4 Spi1Tx SPI1_TX 5 Spi2Rx SPI2_RX 6 Spi2Tx SPI2_TX 7 I2c1Rx I2C1_RX 8 I2c1Tx I2C1_TX 9 I2c2Rx I2C2_RX 10 I2c2Tx I2C2_TX 11 UsartRx USART_RX 12 UsartTx USART_TX 13 LpuartRx LPUART_RX 14 LpuartTx LPUART_TX 15 AdcCh0 ADC_CH0 (DS channel) 16 AdcCh1 ADC_CH1 (DF channel) 17 GPIOA GPIOA address block description GPIO 0x48000000 0x0 0x400 registers GPIOA GPIOA interrupt 15 MODER MODER GPIO port mode register 0x0 0x20 read-write 0xFFFFFFFF 0xFFFFFFFF 16 0x2 0-15 MODE%s Port x configuration pin %s 0 2 read-write Mode Input Input mode 0 Output General purpose output mode 1 Alternate Alternate function mode 2 Analog Analog mode 3 OTYPER OTYPER GPIO port output type register 0x4 0x20 read-write 0x00000000 0xFFFFFFFF 16 0x1 0-15 OT%s Port x configuration pin %s 0 1 read-write OutputType PushPull Output push-pull (reset state) 0 OpenDrain Output open-drain 1 OSPEEDR OSPEEDR GPIO port output speed register 0x8 0x20 read-write 0x00000000 0xFFFFFFFF 16 0x2 0-15 OSPEED%s Port x configuration pin %s 0 2 read-write OutputSpeed LowSpeed Low speed 0 MediumSpeed Medium speed 1 HighSpeed High speed 2 VeryHighSpeed Very high speed 3 PUPDR PUPDR GPIO port pull-up/pull-down register 0xC 0x20 read-write 0x00000000 0xFFFFFFFF 16 0x2 0-15 PUPD%s Port x configuration pin %s 0 2 read-write Pull Floating No pull-up, pull-down 0 PullUp Pull-up 1 PullDown Pull-down 2 IDR IDR GPIO port input data register 0x10 0x20 read-only 0x00000000 0xFFFF0000 16 0x1 0-15 ID%s Port input data pin %s 0 1 read-only InputData Low Input is logic low 0 High Input is logic high 1 ODR ODR GPIO port output data register 0x14 0x20 read-write 0x00000000 0xFFFFFFFF 16 0x1 0-15 OD%s Port output data pin %s 0 1 read-write OutputData Low Set output to logic low 0 High Set output to logic high 1 BSRR BSRR GPIO port bit set/reset register 0x18 0x20 write-only 0x00000000 0xFFFFFFFF 16 0x1 0-15 BS%s Port x set pin %s 0 1 write-only BitSet Set Sets the corresponding ODx bit 1 16 0x1 0-15 BR%s Port x reset pin %s 16 1 write-only BitReset Reset Resets the corresponding ODx bit 1 LCKR LCKR GPIO port configuration lock register 0x1C 0x20 read-write 0x00000000 0xFFFFFFFF 16 0x1 0-15 LCK%s Port x lock pin %s 0 1 read-write Lock Unlocked Port configuration not locked 0 Locked Port configuration locked 1 LCKK Lock key This bit can be read any time. It can only be modified using the lock key write sequence. LOCK key write sequence: WR LCKR[16] = '1' + LCKR[15:0] WR LCKR[16] = '0' + LCKR[15:0] WR LCKR[16] = '1' + LCKR[15:0] RD LCKR RD LCKR[16] = '1' (this read operation is optional but it confirms that the lock is active) Note: During the LOCK key write sequence, the value of LCK[15:0] must not change. Note: Any error in the lock sequence aborts the lock. Note: After the first lock sequence on any bit of the port, any read access on the LCKK bit returns '1' until the next MCU reset or peripheral reset. 16 1 read-write LockKey NotActive Port configuration lock key not active 0 Active Port configuration lock key active 1 AFRL AFRL GPIO alternate function low register 0x20 0x20 read-write 0x00000000 0xFFFFFFFF 8 0x4 0-7 AFSEL%s Alternate function selection for port x I/O pin y These bits are written by software to configure alternate function I/Os. 0 4 read-write AlternateFunction AF0 AF0 0 AF1 AF1 1 AF2 AF2 2 AF3 AF3 3 AF4 AF4 4 AF5 AF5 5 AF6 AF6 6 AF7 AF7 7 AF8 AF8 8 AF9 AF9 9 AF10 AF10 10 AF11 AF11 11 AF12 AF12 12 AF13 AF13 13 AF14 AF14 14 AF15 AF15 15 AFRH AFRH GPIO alternate function high register 0x24 0x20 read-write 0x00000000 0xFFFFFFFF 8 0x4 8-15 AFSEL%s Alternate function selection for port x I/O pin y These bits are written by software to configure alternate function I/Os. 0 4 read-write BRR BRR GPIO port bit reset register 0x28 0x20 write-only 0x00000000 0xFFFFFFFF 16 0x1 0-15 BR%s Port x reset pin %s 0 1 write-only BitReset NoAction No action on the corresponding ODx bit 0 Reset Reset the ODx bit 1 I2C1 I2C address block description I2C 0x41000000 0x0 0x400 registers I2C1 I2C1 interrupt 3 CR1 CR1 I2C control register 1 0x0 0x20 read-write 0x00000000 0xFFFFFFFF PE 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. 0 1 read-write PE Disabled Peripheral disabled 0 Enabled Peripheral enabled 1 TXIE TX Interrupt enable 1 1 read-write TXIE Disabled Transmit (TXIS) interrupt disabled 0 Enabled Transmit (TXIS) interrupt enabled 1 RXIE RX Interrupt enable 2 1 read-write RXIE Disabled Receive (RXNE) interrupt disabled 0 Enabled Receive (RXNE) interrupt enabled 1 ADDRIE Address match Interrupt enable (slave only) 3 1 read-write ADDRIE Disabled Address match (ADDR) interrupts disabled 0 Enabled Address match (ADDR) interrupts enabled 1 NACKIE Not acknowledge received Interrupt enable 4 1 read-write NACKIE Disabled Not acknowledge (NACKF) received interrupts disabled 0 Enabled Not acknowledge (NACKF) received interrupts enabled 1 STOPIE Stop detection Interrupt enable 5 1 read-write STOPIE Disabled Stop detection (STOPF) interrupt disabled 0 Enabled Stop detection (STOPF) interrupt enabled 1 TCIE Transfer Complete interrupt enable Note: Any of these events generate an interrupt: Note: Transfer Complete (TC) Note: Transfer Complete Reload (TCR) 6 1 read-write TCIE Disabled Transfer Complete interrupt disabled 0 Enabled Transfer Complete interrupt enabled 1 ERRIE Error interrupts enable Note: Any of these errors generate an interrupt: Note: Arbitration Loss (ARLO) Note: Bus Error detection (BERR) Note: Overrun/Underrun (OVR) Note: Timeout detection (TIMEOUT) Note: PEC error detection (PECERR) Note: Alert pin event detection (ALERT) 7 1 read-write ERRIE Disabled Error detection interrupts disabled 0 Enabled Error detection interrupts enabled 1 DNF 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] * t<sub>I2CCLK</sub> <sub>...</sub> Note: If the analog filter is also enabled, the digital filter is added to the analog filter. Note: This filter can only be programmed when the I2C is disabled (PE = 0). 8 4 read-write DNF NoFilter Digital filter disabled 0 Filter1 Digital filter enabled and filtering capability up to 1 tI2CCLK 1 Filter2 Digital filter enabled and filtering capability up to 2 tI2CCLK 2 Filter3 Digital filter enabled and filtering capability up to 3 tI2CCLK 3 Filter4 Digital filter enabled and filtering capability up to 4 tI2CCLK 4 Filter5 Digital filter enabled and filtering capability up to 5 tI2CCLK 5 Filter6 Digital filter enabled and filtering capability up to 6 tI2CCLK 6 Filter7 Digital filter enabled and filtering capability up to 7 tI2CCLK 7 Filter8 Digital filter enabled and filtering capability up to 8 tI2CCLK 8 Filter9 Digital filter enabled and filtering capability up to 9 tI2CCLK 9 Filter10 Digital filter enabled and filtering capability up to 10 tI2CCLK 10 Filter11 Digital filter enabled and filtering capability up to 11 tI2CCLK 11 Filter12 Digital filter enabled and filtering capability up to 12 tI2CCLK 12 Filter13 Digital filter enabled and filtering capability up to 13 tI2CCLK 13 Filter14 Digital filter enabled and filtering capability up to 14 tI2CCLK 14 Filter15 Digital filter enabled and filtering capability up to 15 tI2CCLK 15 ANFOFF Analog noise filter OFF Note: This bit can only be programmed when the I2C is disabled (PE = 0). 12 1 read-write ANFOFF Enabled Analog noise filter enabled 0 Disabled Analog noise filter disabled 1 TXDMAEN DMA transmission requests enable 14 1 read-write TXDMAEN Disabled DMA mode disabled for transmission 0 Enabled DMA mode enabled for transmission 1 RXDMAEN DMA reception requests enable 15 1 read-write RXDMAEN Disabled DMA mode disabled for reception 0 Enabled DMA mode enabled for reception 1 SBC Slave byte control This bit is used to enable hardware byte control in slave mode. 16 1 read-write SBC Disabled Slave byte control disabled 0 Enabled Slave byte control enabled 1 NOSTRETCH 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). 17 1 read-write NOSTRETCH Enabled Clock stretching enabled 0 Disabled Clock stretching disabled 1 WUPEN 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 Section 52.3: I2C implementation. Note: WUPEN can be set only when DNF = '0000' 18 1 read-write WUPEN Disabled Wakeup from Stop mode disabled 0 Enabled Wakeup from Stop mode enabled 1 GCEN General call enable 19 1 read-write GCEN Disabled General call disabled. Address 0b00000000 is NACKed 0 Enabled General call enabled. Address 0b00000000 is ACKed 1 SMBHEN SMBus host address enable Note: If the SMBus feature is not supported, this bit is reserved and forced by hardware to '0'. Refer to Section 52.3: I2C implementation. 20 1 read-write SMBHEN Disabled Host address disabled. Address 0b0001000x is NACKed 0 Enabled Host address enabled. Address 0b0001000x is ACKed 1 SMBDEN 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 Section 52.3: I2C implementation. 21 1 read-write SMBDEN Disabled Device default address disabled. Address 0b1100001x is NACKed 0 Enabled Device default address enabled. Address 0b1100001x is ACKed 1 ALERTEN SMBus alert enable Note: When ALERTEN=0, the SMBA pin can be used as a standard GPIO. Note: If the SMBus feature is not supported, this bit is reserved and forced by hardware to '0'. Refer to Section 52.3: I2C implementation. 22 1 read-write ALERTEN Disabled In device mode (SMBHEN=Disabled) Releases SMBA pin high and Alert Response Address Header disabled (0001100x) followed by NACK. In host mode (SMBHEN=Enabled) SMBus Alert pin (SMBA) not supported 0 Enabled In device mode (SMBHEN=Disabled) Drives SMBA pin low and Alert Response Address Header enabled (0001100x) followed by ACK.In host mode (SMBHEN=Enabled) SMBus Alert pin (SMBA) supported 1 PECEN PEC enable Note: If the SMBus feature is not supported, this bit is reserved and forced by hardware to '0'. Refer to Section 52.3: I2C implementation. 23 1 read-write PECEN Disabled PEC calculation disabled 0 Enabled PEC calculation enabled 1 CR2 CR2 I2C control register 2 0x4 0x20 read-write 0x00000000 0xFFFFFFFF SADD 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. 0 10 read-write 0 1023 RD_WRN Transfer direction (master mode) Note: Changing this bit when the START bit is set is not allowed. 10 1 read-write RD_WRN Write Master requests a write transfer 0 Read Master requests a read transfer 1 ADD10 10-bit addressing mode (master mode) Note: Changing this bit when the START bit is set is not allowed. 11 1 read-write ADD10 Bit7 The master operates in 7-bit addressing mode 0 Bit10 The master operates in 10-bit addressing mode 1 HEAD10R 10-bit address header only read direction (master receiver mode) Note: Changing this bit when the START bit is set is not allowed. 12 1 read-write HEAD10R Complete The master sends the complete 10 bit slave address read sequence 0 Partial The master only sends the 1st 7 bits of the 10 bit address, followed by Read direction 1 START 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. Note: The START bit can be set even if the bus is BUSY or I2C is in slave mode. Note: This bit has no effect when RELOAD is set. 13 1 read-write oneToSet STARTR read NoStart No Start generation 0 Start Restart/Start generation 1 STARTW write Start Restart/Start generation 1 STOP 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. 14 1 read-write oneToSet STOPR read NoStop No Stop generation 0 Stop Stop generation after current byte transfer 1 STOPW write Stop Stop generation after current byte transfer 1 NACK 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. Note: 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. Note: When an overrun occurs in slave receiver NOSTRETCH mode, a NACK is automatically generated whatever the NACK bit value. Note: When hardware PEC checking is enabled (PECBYTE=1), the PEC acknowledge value does not depend on the NACK value. 15 1 read-write oneToSet NACKR read Ack an ACK is sent after current received byte 0 Nack a NACK is sent after current received byte 1 NACKW write Nack a NACK is sent after current received byte 1 NBYTES 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. 16 8 read-write 0 255 RELOAD NBYTES reload mode This bit is set and cleared by software. 24 1 read-write RELOAD Completed The transfer is completed after the NBYTES data transfer (STOP or RESTART will follow) 0 NotCompleted The transfer is not completed after the NBYTES data transfer (NBYTES will be reloaded) 1 AUTOEND 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. 25 1 read-write AUTOEND Software Software end mode: TC flag is set when NBYTES data are transferred, stretching SCL low 0 Automatic Automatic end mode: a STOP condition is automatically sent when NBYTES data are transferred 1 PECBYTE 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. Note: This bit has no effect when RELOAD is set. Note: This bit has no effect is slave mode when SBC=0. Note: If the SMBus feature is not supported, this bit is reserved and forced by hardware to '0'. Refer to Section 52.3: I2C implementation. 26 1 read-write oneToSet PECBYTER read NoPec No PEC transfer 0 Pec PEC transmission/reception is requested 1 PECBYTEW write Pec PEC transmission/reception is requested 1 OAR1 OAR1 I2C own address 1 register 0x8 0x20 read-write 0x00000000 0xFFFFFFFF OA1 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. 0 10 read-write 0 1023 OA1MODE Own address 1 10-bit mode Note: This bit can be written only when OA1EN=0. 10 1 read-write OA1MODE Bit7 Own address 1 is a 7-bit address 0 Bit10 Own address 1 is a 10-bit address 1 OA1EN Own address 1 enable 15 1 read-write OA1EN Disabled Own address 1 disabled. The received slave address OA1 is NACKed 0 Enabled Own address 1 enabled. The received slave address OA1 is ACKed 1 OAR2 OAR2 I2C own address 2 register 0xC 0x20 read-write 0x00000000 0xFFFFFFFF OA2 Interface address 7-bit addressing mode: 7-bit address Note: These bits can be written only when OA2EN=0. 1 7 read-write 0 127 OA2MSK Own address 2 masks Note: These bits can be written only when OA2EN=0. Note: As soon as OA2MSK is not equal to 0, the reserved I2C addresses (0b0000xxx and 0b1111xxx) are not acknowledged even if the comparison matches. 8 3 read-write OA2MSK NoMask No mask 0 Mask1 OA2[1] is masked and donât care. Only OA2[7:2] are compared 1 Mask2 OA2[2:1] are masked and donât care. Only OA2[7:3] are compared 2 Mask3 OA2[3:1] are masked and donât care. Only OA2[7:4] are compared 3 Mask4 OA2[4:1] are masked and donât care. Only OA2[7:5] are compared 4 Mask5 OA2[5:1] are masked and donât care. Only OA2[7:6] are compared 5 Mask6 OA2[6:1] are masked and donât care. Only OA2[7] is compared. 6 Mask7 OA2[7:1] are masked and donât care. No comparison is done, and all (except reserved) 7-bit received addresses are acknowledged 7 OA2EN Own address 2 enable 15 1 read-write OA2EN Disabled Own address 2 disabled. The received slave address OA2 is NACKed 0 Enabled Own address 2 enabled. The received slave address OA2 is ACKed 1 TIMINGR TIMINGR I2C timing register 0x10 0x20 read-write 0x00000000 0xFFFFFFFF SCLL SCL low period (master mode) This field is used to generate the SCL low period in master mode. t<sub>SCLL </sub>= (SCLL+1) x t<sub>PRESC</sub> Note: SCLL is also used to generate t<sub>BUF </sub>and t<sub>SU:STA </sub>timings. 0 8 read-write 0 255 SCLH SCL high period (master mode) This field is used to generate the SCL high period in master mode. t<sub>SCLH </sub>= (SCLH+1) x t<sub>PRESC</sub> Note: SCLH is also used to generate t<sub>SU:STO </sub>and t<sub>HD:STA </sub>timing. 8 8 read-write 0 255 SDADEL Data hold time This field is used to generate the delay t<sub>SDADEL </sub>between SCL falling edge and SDA edge. In master mode and in slave mode with NOSTRETCH = 0, the SCL line is stretched low during t<sub>SDADEL</sub>. t<sub>SDADEL</sub>= SDADEL x t<sub>PRESC</sub> Note: SDADEL is used to generate t<sub>HD:DAT </sub>timing. 16 4 read-write 0 15 SCLDEL Data setup time This field is used to generate a delay t<sub>SCLDEL </sub>between SDA edge and SCL rising edge. In master mode and in slave mode with NOSTRETCH = 0, the SCL line is stretched low during t<sub>SCLDEL</sub>. t<sub>SCLDEL </sub>= (SCLDEL+1) x t<sub>PRESC</sub> Note: t<sub>SCLDEL</sub> is used to generate t<sub>SU:DAT </sub>timing. 20 4 read-write 0 15 PRESC Timing prescaler This field is used to prescale i2c_ker_ck in order to generate the clock period t<sub>PRESC </sub>used for data setup and hold counters (refer to I2C timings on page2521) and for SCL high and low level counters (refer to I2C master initialization on page2536). t<sub>PRESC </sub>= (PRESC+1) x t<sub>I2CCLK</sub> 28 4 read-write 0 15 TIMEOUTR TIMEOUTR I2C timeout register 0x14 0x20 read-write 0x00000000 0xFFFFFFFF TIMEOUTA Bus Timeout A This field is used to configure: The SCL low timeout condition t<sub>TIMEOUT</sub> when TIDLE=0 t<sub>TIMEOUT</sub>= (TIMEOUTA+1) x 2048 x t<sub>I2CCLK</sub> The bus idle condition (both SCL and SDA high) when TIDLE=1 t<sub>IDLE</sub>= (TIMEOUTA+1) x 4 x t<sub>I2CCLK</sub> Note: These bits can be written only when TIMOUTEN=0. 0 12 read-write 0 4095 TIDLE Idle clock timeout detection Note: This bit can be written only when TIMOUTEN=0. 12 1 read-write TIDLE Disabled TIMEOUTA is used to detect SCL low timeout 0 Enabled TIMEOUTA is used to detect both SCL and SDA high timeout (bus idle condition) 1 TIMOUTEN Clock timeout enable 15 1 read-write TIMOUTEN Disabled SCL timeout detection is disabled 0 Enabled SCL timeout detection is enabled 1 TIMEOUTB Bus timeout B This field is used to configure the cumulative clock extension timeout: In master mode, the master cumulative clock low extend time (t<sub>LOW:MEXT</sub>) is detected In slave mode, the slave cumulative clock low extend time (t<sub>LOW:SEXT</sub>) is detected t<sub>LOW:EXT</sub>= (TIMEOUTB+1) x 2048 x t<sub>I2CCLK</sub> Note: These bits can be written only when TEXTEN=0. 16 12 read-write 0 4095 TEXTEN Extended clock timeout enable 31 1 read-write TEXTEN Disabled Extended clock timeout detection is disabled 0 Enabled Extended clock timeout detection is enabled 1 ISR ISR I2C interrupt and status register 0x18 0x20 read-write 0x00000001 0xFFFFFFFF TXE Transmit data register empty (transmitters) This bit is set by hardware when the I2C_TXDR register is empty. It is cleared when the next data to be sent is written in the I2C_TXDR register. This bit can be written to '1' by software in order to flush the transmit data register I2C_TXDR. Note: This bit is set by hardware when PE = 0. 0 1 read-write oneToSet TXER read NotEmpty TXDR register not empty 0 Empty TXDR register empty 1 TXEW write Flush Flush the transmit data register 1 TXIS Transmit interrupt status (transmitters) This bit is set by hardware when the I2C_TXDR register is empty and the data to be transmitted must be written in the I2C_TXDR register. It is cleared when the next data to be sent is written in the I2C_TXDR register. This bit can be written to '1' by software when NOSTRETCH = 1 only, in order to generate a TXIS event (interrupt if TXIE=1 or DMA request if TXDMAEN = 1). Note: This bit is cleared by hardware when PE = 0. 1 1 read-write oneToSet TXISR read NotEmpty The TXDR register is not empty 0 Empty The TXDR register is empty and the data to be transmitted must be written in the TXDR register 1 TXISW write Trigger Generate a TXIS event 1 RXNE Receive data register not empty (receivers) This bit is set by hardware when the received data is copied into the I2C_RXDR register, and is ready to be read. It is cleared when I2C_RXDR is read. Note: This bit is cleared by hardware when PE = 0. 2 1 read-only RXNE Empty The RXDR register is empty 0 NotEmpty Received data is copied into the RXDR register, and is ready to be read 1 ADDR Address matched (slave mode) This bit is set by hardware as soon as the received slave address matched with one of the enabled slave addresses. It is cleared by software by setting ADDRCF bit. Note: This bit is cleared by hardware when PE = 0. 3 1 read-only ADDR NotMatch Adress mismatched or not received 0 Match Received slave address matched with one of the enabled slave addresses 1 NACKF Not Acknowledge received flag This flag is set by hardware when a NACK is received after a byte transmission. It is cleared by software by setting the NACKCF bit. Note: This bit is cleared by hardware when PE = 0. 4 1 read-only NACKF NoNack No NACK has been received 0 Nack NACK has been received 1 STOPF Stop detection flag This flag is set by hardware when a STOP condition is detected on the bus and the peripheral is involved in this transfer: either as a master, provided that the STOP condition is generated by the peripheral. or as a slave, provided that the peripheral has been addressed previously during this transfer. It is cleared by software by setting the STOPCF bit. Note: This bit is cleared by hardware when PE = 0. 5 1 read-only STOPF NoStop No Stop condition detected 0 Stop Stop condition detected 1 TC Transfer Complete (master mode) This flag is set by hardware when RELOAD=0, AUTOEND=0 and NBYTES data have been transferred. It is cleared by software when START bit or STOP bit is set. Note: This bit is cleared by hardware when PE = 0. 6 1 read-only TC NotComplete Transfer is not complete 0 Complete NBYTES has been transfered 1 TCR Transfer Complete Reload This flag is set by hardware when RELOAD=1 and NBYTES data have been transferred. It is cleared by software when NBYTES is written to a non-zero value. Note: This bit is cleared by hardware when PE = 0. Note: This flag is only for master mode, or for slave mode when the SBC bit is set. 7 1 read-only TCR NotComplete Transfer is not complete 0 Complete NBYTES has been transfered 1 BERR Bus error This flag is set by hardware when a misplaced Start or STOP condition is detected whereas the peripheral is involved in the transfer. The flag is not set during the address phase in slave mode. It is cleared by software by setting BERRCF bit. Note: This bit is cleared by hardware when PE = 0. 8 1 read-only BERR NoError No bus error 0 Error Misplaced Start and Stop condition is detected 1 ARLO Arbitration lost This flag is set by hardware in case of arbitration loss. It is cleared by software by setting the ARLOCF bit. Note: This bit is cleared by hardware when PE = 0. 9 1 read-only ARLO NotLost No arbitration lost 0 Lost Arbitration lost 1 OVR Overrun/Underrun (slave mode) This flag is set by hardware in slave mode with NOSTRETCH = 1, when an overrun/underrun error occurs. It is cleared by software by setting the OVRCF bit. Note: This bit is cleared by hardware when PE = 0. 10 1 read-only OVR NoOverrun No overrun/underrun error occurs 0 Overrun slave mode with NOSTRETCH=1, when an overrun/underrun error occurs 1 PECERR PEC Error in reception This flag is set by hardware when the received PEC does not match with the PEC register content. A NACK is automatically sent after the wrong PEC reception. It is cleared by software by setting the PECCF bit. Note: This bit is cleared by hardware when PE = 0. Note: If the SMBus feature is not supported, this bit is reserved and forced by hardware to '0'. Refer to Section 52.3: I2C implementation. 11 1 read-only PECERR Match Received PEC does match with PEC register 0 NoMatch Received PEC does not match with PEC register 1 TIMEOUT Timeout or t<sub>LOW</sub> detection flag This flag is set by hardware when a timeout or extended clock timeout occurred. It is cleared by software by setting the TIMEOUTCF bit. Note: This bit is cleared by hardware when PE = 0. Note: If the SMBus feature is not supported, this bit is reserved and forced by hardware to '0'. Refer to Section 52.3: I2C implementation. 12 1 read-only TIMEOUT NoTimeout No timeout occured 0 Timeout Timeout occured 1 ALERT SMBus alert This flag is set by hardware when SMBHEN=1 (SMBus host configuration), ALERTEN=1 and a SMBALERT event (falling edge) is detected on SMBA pin. It is cleared by software by setting the ALERTCF bit. Note: This bit is cleared by hardware when PE = 0. Note: If the SMBus feature is not supported, this bit is reserved and forced by hardware to '0'. Refer to Section 52.3: I2C implementation. 13 1 read-only ALERT NoAlert SMBA alert is not detected 0 Alert SMBA alert event is detected on SMBA pin 1 BUSY Bus busy This flag indicates that a communication is in progress on the bus. It is set by hardware when a START condition is detected. It is cleared by hardware when a STOP condition is detected, or when PE = 0. 15 1 read-only BUSY NotBusy No communication is in progress on the bus 0 Busy A communication is in progress on the bus 1 DIR Transfer direction (Slave mode) This flag is updated when an address match event occurs (ADDR = 1). 16 1 read-only DIR Write Write transfer, slave enters receiver mode 0 Read Read transfer, slave enters transmitter mode 1 ADDCODE Address match code (Slave mode) These bits are updated with the received address when an address match event occurs (ADDR = 1). In the case of a 10-bit address, ADDCODE provides the 10-bit header followed by the 2 MSBs of the address. 17 7 read-only 0 127 ICR ICR I2C interrupt clear register 0x1C 0x20 write-only 0x00000000 0xFFFFFFFF ADDRCF Address matched flag clear Writing 1 to this bit clears the ADDR flag in the I2C_ISR register. Writing 1 to this bit also clears the START bit in the I2C_CR2 register. 3 1 write-only oneToClear ADDRCF Clear Clears the ADDR flag in ISR register 1 NACKCF Not Acknowledge flag clear Writing 1 to this bit clears the NACKF flag in I2C_ISR register. 4 1 write-only oneToClear NACKCF Clear Clears the NACK flag in ISR register 1 STOPCF STOP detection flag clear Writing 1 to this bit clears the STOPF flag in the I2C_ISR register. 5 1 write-only oneToClear STOPCF Clear Clears the STOP flag in ISR register 1 BERRCF Bus error flag clear Writing 1 to this bit clears the BERRF flag in the I2C_ISR register. 8 1 write-only oneToClear BERRCF Clear Clears the BERR flag in ISR register 1 ARLOCF Arbitration lost flag clear Writing 1 to this bit clears the ARLO flag in the I2C_ISR register. 9 1 write-only oneToClear ARLOCF Clear Clears the ARLO flag in ISR register 1 OVRCF Overrun/Underrun flag clear Writing 1 to this bit clears the OVR flag in the I2C_ISR register. 10 1 write-only oneToClear OVRCF Clear Clears the OVR flag in ISR register 1 PECCF PEC Error flag clear Writing 1 to this bit clears the PECERR flag in the I2C_ISR register. Note: If the SMBus feature is not supported, this bit is reserved and forced by hardware to '0'. Refer to Section 52.3: I2C implementation. 11 1 write-only oneToClear PECCF Clear Clears the PEC flag in ISR register 1 TIMOUTCF Timeout detection flag clear Writing 1 to this bit clears the TIMEOUT flag in the I2C_ISR register. Note: If the SMBus feature is not supported, this bit is reserved and forced by hardware to '0'. Refer to Section 52.3: I2C implementation. 12 1 write-only oneToClear TIMOUTCF Clear Clears the TIMOUT flag in ISR register 1 ALERTCF Alert flag clear Writing 1 to this bit clears the ALERT flag in the I2C_ISR register. Note: If the SMBus feature is not supported, this bit is reserved and forced by hardware to '0'. Refer to Section 52.3: I2C implementation. 13 1 write-only oneToClear ALERTCF Clear Clears the ALERT flag in ISR register 1 PECR PECR I2C PEC register 0x20 0x20 read-only 0x00000000 0xFFFFFFFF PEC Packet error checking register This field contains the internal PEC when PECEN=1. The PEC is cleared by hardware when PE = 0. 0 8 read-only 0 255 RXDR RXDR I2C receive data register 0x24 0x20 read-only 0x00000000 0xFFFFFFFF RXDATA 8-bit receive data Data byte received from the I<sup>2</sup>C bus 0 8 read-only 0 255 TXDR TXDR I2C transmit data register 0x28 0x20 read-write 0x00000000 0xFFFFFFFF TXDATA 8-bit transmit data Data byte to be transmitted to the I<sup>2</sup>C bus Note: These bits can be written only when TXE = 1. 0 8 read-write 0 255 RCC RCC 0x48400000 0x0 0xA0 registers RCC Reset and Clock Controller 1 BATTERY PVD 2 CR CR CR register 0x0 0x20 read-write 0x00001400 LSION Internal Low Speed oscillator enable Set and reset by software. Reset source only for this field: PORESETn 2 1 read-write LSIRDY Internal Low Speed oscillator Ready Set and reset by hardware to indicate when the Low Speed Internal RC oscillator is stable. Reset source only for this field: PORESETn 3 1 read-only LSEON External Low Speed Clock enable. Set and reset by software. Reset source only for this field: PORESETn 4 1 read-write LSERDY External Low Speed Clock ready flag. Set by hardware to indicate that LSE oscillator is stable. 5 1 read-only LSEBYP External Low Speed Clock bypass. Set and reset by software. Reset source only for this field: PORESETn 6 1 read-write LOCKDET_NSTOP Lock detector Nstop value When start_stop signal is high; a counter is incremented every 16 MHz clock cycle. When the counter reaches (NSTOP+1) x 64 value, the lock_det signal is set high indicating that the PLL is locked. As soon as the start_stop signal is low the counter is reset to 0. 7 3 read-write HSIRDY Internal High Speed clock ready flag. Set by hardware to indicate that internal RC 64MHz oscillator is stable. This bit is activated only if the RC is enabled by HSION (it is not activated if the RC is enabled by an IP request). 10 1 read-only HSEPLLBUFON External High Speed Clock Buffer for PLL RF2G4 enable. Set and reset by software. 12 1 read-write HSIPLLON Internal High Speed Clock PLL enable 13 1 read-write HSIPLLRDY Internal High Speed Clock PLL ready flag. 14 1 read-only HSEON External High Speed Clock enable. Set and reset by software. in low power mode, HSE is turned off. 16 1 read-write HSERDY External High Speed Clock ready flag. Set by hardware to indicate that HSE oscillator is stable. 17 1 read-only CFGR CFGR CFGR register 0x8 0x20 read-write 0x00000240 SMPSINV bit to control inversion of the SMPS clock 0 1 read-write HSESEL Clock source selection request: 1 1 read-write STOPHSI Stop HSI clock source request 2 1 read-write CLKSYSDIV CLKSYSDIV: system clock divided factor from HSI_64M. 5 3 read-write SMPSDIV SMPS clock prescaling factor to generate 4MHz or 8MHz 12 1 read-write CLKSLOWSEL slow clock source selection Set by software to select the clock source. This is no glitch free mechanism Reset source only for this field: PORESETn 15 2 read-write IOBOOSTEN IO BOOSTER enable Set and reset by software. 17 1 read-write SPI3I2SCLKSEL Selection of I2S1 clock: 1x:64MHz peripheral clock 22 1 read-write SPI2I2SCLKSEL Selection of I2S clock: 1x:64MHz peripheral clock 23 1 read-write LCOSEL Low speed Configurable Clock Output Selection. Set and reset by software. Glitches propagation possible. Reset source only for this field: PORESETn 24 2 read-write MCOSEL Main Configurable Clock Output Selection. Set and reset by software. Glitches propagation possible. 26 3 read-write CCOPRE Configurable Clock Output Prescaler. Set and reset by software. Glitches propagation if CCOPRE is modified after CCO output is enabled. Others: not used 29 3 read-write CIER CIER CIER register 0x18 0x20 read-write 0x00000000 LSIRDYIE LSI Ready Interrupt Enable. Set and reset by software to enable/disable interrupt caused by internal RC 32 kHz oscillator stabilization. 0 1 read-write LSERDYIE LSE Ready Interrupt Enable. Set and reset by software to enable/disable interrupt caused by the external 32 kHz oscillator stabilization. 1 1 read-write HSIRDYIE HSI Ready Interrupt Enable. Set and reset by software to enable/disable interrupt caused by the internal RC 64MHz oscillator stabilization. 3 1 read-write HSERDYIE HSE Ready Interrupt Enable Set and reset by software to enable/disable interrupt caused by the external HSE oscillator stabilization. 4 1 read-write HSIPLLRDYIE HSI PLL Ready Interrupt Enable. Set and reset by software to enable/disable interrupt caused by the HSI 64MHz PLL locked on HSE. 5 1 read-write HSIPLLUNLOCKDETIE HSIPLLUNLOCKDETIE: HSI PLL unlock detection Interrupt Enable. Set and reset by software to enable/disable interrupt caused by the HSI 64MHz PLL unlock. 6 1 read-write RTCRSTIE RTCRSTIE: RTC reset end Interrupt Enable. Set and reset by software to enable/disable interrupt caused by the RTC reset end. 7 1 read-write WDGRSTIE WDGRSTIE: Watchdog reset end Interrupt Enable. Set and reset by software to enable/disable interrupt caused by the watchdog reset end. 8 1 read-write CIFR CIFR CIFR register 0x1C 0x20 read-write 0x00000008 LSIRDYIF LSI Ready Interrupt flag Set by hardware when LSI clock becomes stable. 0 1 read-write LSERDYIF LSE Ready Interrupt Flag. Set by hardware when LSE clock becomes stable. 1 1 read-write HSIRDYIF HSI Ready Interrupt Flag. Set by hardware when HSI becomes stable. 3 1 read-write HSERDYIF HSE Ready Interrupt Flag. Set by hardware when HSE becomes stable. 4 1 read-write HSIPLLRDYIF HSI PLL Ready Interrupt Flag. Set by hardware when HSI PLL 64MHz becomes stable. 5 1 read-write HSIPLLUNLOCKDETIF HSIPLLUNLOCKDETIF: HSI PLL unlock detection Interrupt Flag. 6 1 read-write RTCRSTIF RTC reset end Interrupt Flag. Raised when reset is released on 32kHz clock 7 1 read-write WDGRSTIF WDG reset end Interrupt Flag. Raised when reset is released on 32kHz clock 8 1 read-write CSCMDR CSCMDR CSCMDR register 0x20 0x20 read-write 0x00000080 REQUEST Request for system clock switching Cleared by hardware when system clock frequency switch is done 0 1 read-write CLKSYSDIV_REQ system clock dividing factor from HSI_64M requested Note: behavior depends on BLEEN in APB2ENR register 1 3 read-write STATUS Status of clock switch sequence 4 2 read-only EOFSEQ_IE End of sequence Interrupt Enable. Set and reset by software to enable/disable interrupt caused by the clock system switch. 6 1 read-write EOFSEQ_IRQ End of Sequence flag Set by hardware when clock system swtich is ended 7 1 read-write AHBRSTR AHBRSTR AHBRSTR register 0x30 0x20 read-write 0x00000000 DMARST DMA and DMAMUX reset Set and reset by software. 0 1 read-write GPIOARST GPIOA reset Set and reset by software. 2 1 read-write GPIOBRST GPIOB reset Set and reset by software. 3 1 read-write CRCRST CRC reset Set and reset by software. 12 1 read-write PKARST PKA reset Set and reset by software. 16 1 read-write RNGRST RNG reset Set and reset by software. 18 1 read-write APB0RSTR APB0RSTR APB0RSTR register 0x34 0x20 read-write 0x00000000 TIM1RST TIM1: Advanced Timer reset Set and reset by software. 0 1 read-write SYSCFGRST SYSTEM CONFIG reset Set and reset by software. 8 1 read-write RTCRST RTC reset Set and reset by software. 12 1 read-write WDGRST WATCHDOG reset Set and reset by software. 14 1 read-write APB1RSTR APB1RSTR APB1RSTR register 0x38 0x20 read-write 0x00000000 SPI1RST SPI1 reset 0 1 read-write ADCRST ADC reset. 4 1 read-write LPUARTRST LPUART reset Set and reset by software. 8 1 read-write USARTRST USART reset Set and reset by software. 10 1 read-write SPI2RST SPI2 reset. 12 1 read-write SPI3RST SPI3 reset Set and reset by software. 14 1 read-write I2C1RST I2C1 reset Set and reset by software. 21 1 read-write I2C2RST 2C2 reset. 23 1 read-write APB2RSTR APB2RSTR APB2RSTR register 0x40 0x20 read-write 0x00000000 MRBLERST MR_BLE (Bluetooth radio) reset. 0 1 read-write AHBENR AHBENR AHBENR register 0x50 0x20 read-write 0x0000000C DMAEN DMA and DMAMUX enable Set and enable by software. 0 1 read-write GPIOAEN GPIOA enable. It must be enabled by default 2 1 read-write GPIOBEN GPIOB enable. It must be enabled by default 3 1 read-write CRCEN CRC enable Set and enable by software. 12 1 read-write PKAEN PKA clock enable Set and enable by software. 16 1 read-write RNGEN RNG clock enable Set and enable by software. 18 1 read-write APB0ENR APB0ENR APB0ENR register 0x54 0x20 read-write 0x00000000 TIM1EN TIM1 enable 0 1 read-write SYSCFGEN SYSTEM CONFIG enable Set and enable by software. 8 1 read-write RTCEN RTC clock enable Set and enable by software. Reset source only for this field: PORESETn 12 1 read-write WDGEN Watchdog clock enable. Set and enable by software. 14 1 read-write APB1ENR APB1ENR APB1ENR register 0x58 0x20 read-write 0x00000000 SPI1EN SPI1 enable. 0 1 read-write ADCDIGEN ADC clock enable for digital part of the ADC block. 4 1 read-write ADCANAEN ADC clock enable for the analog part of the ADC block. 5 1 read-write LPUARTEN LPUART clock enable Set and enable by software. 8 1 read-write USART1EN USART clock enable Set and enable by software. 10 1 read-write SPI2EN SPI2 enable 12 1 read-write SPI3EN SPI3 clock enable Set and enable by software. 14 1 read-write I2C1EN I2C1 clock enable Set and enable by software. 21 1 read-write I2C2EN I2C2 enable. 23 1 read-write APB2ENR APB2ENR APB2ENR register 0x60 0x20 read-write 0x00000000 MRBLEEN MR_BLE enable 0 1 read-write CLKBLEDIV MR_BLE clock frequency selection when RCC_APB2ENR.MRBLEEN=1 2 1 read-write CSR CSR CSR register 0x94 0x20 read-write 0x0C000000 RMVF Remove reset flag Set by software to clear the value of the reset flags. It auto clears by HW after clearing reason flags 23 1 write-only PADRSTF SYSTEM reset flag Reset by software by writing the RMVF bit. Set by hardware when a reset from pad occurs. 26 1 read-only PORRSTF POWER reset flag Reset by software by writing the RMVF bit. Set by hardware when a power reset occurs from LPMURESET block. 27 1 read-only SFTRSTF Software reset flag Reset by software by writing the RMVF bit. Set by hardware when a software reset occurs. 28 1 read-only WDGRSTF Watchdog reset flag Reset by software by writing the RMVF bit. Set by hardware when a watchdog reset from V33 domain occurs. 29 1 read-only LOCKUPRSTF LOCK UP reset flag from CM0 Reset by software by writing the RMVF bit. Set by hardware from unrecoverable exception CPU. It reset V12i domain, FLASH controller and peripherals. 30 1 read-only RFSWHSECR RFSWHSECR RFSWHSECR register 0x98 0x20 read-write 0x00000030 SATRG Sense Amplifier threshold Set by software. 3 1 read-write GMC High Speed External XO current control Set by software. 4 3 read-write SWXOTUNEEN RF-HSE capacitor bank tuning by SW enable Set by software 7 1 read-write SWXOTUNE RF-HSE capacitor bank tuning value by SW Set by software 8 6 read-write RFHSECR RFHSECR RFHSECR register 0x9C 0x20 read-only XOTUNE RF-HSE capacitor bank tuning Set by option byte loading soon after Power On Reset. 0 6 read-only SPI1 SPI 0x41002000 0x0 0x24 registers SPI1 SPI1 interrupt 5 CR1 CR1 SPI1_CR1 register 0x0 0x10 read-write 0x00000000 CPHA Clock phase - 0: The first clock transition is the first data capture edge - 1: The second clock transition is the first data capture edge 0 1 read-write CPHA FirstEdge The first clock transition is the first data capture edge 0 SecondEdge The second clock transition is the first data capture edge 1 CPOL Clock polarity - 0: CK to 0 when idle - 1: CK to 1 when idle 1 1 read-write CPOL IdleLow CK to 0 when idle 0 IdleHigh CK to 1 when idle 1 MSTR Master selection - 0: Slave configuration - 1: Master configuration 2 1 read-write MSTR Slave Slave configuration 0 Master Master configuration 1 BR Baud rate control - 000: fPCLK/2 - 001: fPCLK/4 - 010: fPCLK/8 - 011: fPCLK/16 - 100: fPCLK/32 - 101: fPCLK/64 - 110: fPCLK/128 - 111: fPCLK/256 3 3 read-write BR Div2 f_PCLK / 2 0 Div4 f_PCLK / 4 1 Div8 f_PCLK / 8 2 Div16 f_PCLK / 16 3 Div32 f_PCLK / 32 4 Div64 f_PCLK / 64 5 Div128 f_PCLK / 128 6 Div256 f_PCLK / 256 7 SPE SPI enable - 0: Peripheral disabled - 1: Peripheral enabled 6 1 read-write SPE Disabled Peripheral disabled 0 Enabled Peripheral enabled 1 LSBFIRST Frame format - 0: data is transmitted / received with the MSB first - 1: data is transmitted / received with the LSB first 7 1 read-write LSBFIRST MSBFirst Data is transmitted/received with the MSB first 0 LSBFirst Data is transmitted/received with the LSB first 1 SSI Internal slave select This bit has an effect only when the SSM bit is set. The value of this bit is forced onto the NSS pin and the I/O value of the NSS pin is ignored. 8 1 read-write SSI SlaveSelected 0 is forced onto the NSS pin and the I/O value of the NSS pin is ignored 0 SlaveNotSelected 1 is forced onto the NSS pin and the I/O value of the NSS pin is ignored 1 SSM Software slave management When the SSM bit is set, the NSS pin input is replaced with the value from the SSI bit. - 0: Software slave management disabled - 1: Software slave management enabled 9 1 read-write SSM Disabled Software slave management disabled 0 Enabled Software slave management enabled 1 RXONLY Receive only mode enabled. This bit enables simplex communication using a single unidirectional line to receive data exclusively. Keep BIDIMODE bit clear when receive only mode is active.This bit is also useful in a multislave system in which this particular slave is not accessed, the output from the accessed slave is not corrupted. - 0: Full duplex (Transmit and receive) - 1: Output disabled (Receive-only mode) 10 1 read-write RXONLY FullDuplex Full duplex (Transmit and receive) 0 OutputDisabled Output disabled (Receive-only mode) 1 CRCL CRC length This bit is set and cleared by software to select the CRC length. - 0: 8-bit CRC length - 1: 16-bit CRC length 11 1 read-write CRCL EightBit 8-bit CRC length 0 SixteenBit 16-bit CRC length 1 CRCNEXT Transmit CRC next - 0: Next transmit value is from Tx buffer - 1: Next transmit value is from Tx CRC register 12 1 read-write CRCNEXT TxBuffer Next transmit value is from Tx buffer 0 CRC Next transmit value is from Tx CRC register 1 CRCEN Hardware CRC calculation enable - 0: CRC calculation disabled - 1: CRC calculation Enabled 13 1 read-write CRCEN Disabled CRC calculation disabled 0 Enabled CRC calculation enabled 1 BIDIOE Output enable in bidirectional mode This bit combined with the BIDIMODE bit selects the direction of transfer in bidirectional mode - 0: Output disabled (receive-only mode) - 1: Output enabled (transmit-only mode) 14 1 read-write BIDIOE OutputDisabled Output disabled (receive-only mode) 0 OutputEnabled Output enabled (transmit-only mode) 1 BIDIMODE Bidirectional data mode enable. This bit enables half-duplex communication using common single bidirectional data line. Keep RXONLY bit clear when bidirectional mode is active. - 0: 2-line unidirectional data mode selected - 1: 1-line bidirectional data mode selected 15 1 read-write BIDIMODE Unidirectional 2-line unidirectional data mode selected 0 Bidirectional 1-line bidirectional data mode selected 1 CR2 CR2 SPI1_CR2 register 0x4 0x10 read-write 0x00000700 RXDMAEN Rx buffer DMA enable When this bit is set, a DMA request is generated whenever the RXNE flag is set. - 0: Rx buffer DMA disabled - 1: Rx buffer DMA enabled 0 1 read-write RXDMAEN Disabled Rx buffer DMA disabled 0 Enabled Rx buffer DMA enabled 1 TXDMAEN Tx buffer DMA enable When this bit is set, a DMA request is generated whenever the TXE flag is set. - 0: Tx buffer DMA disabled - 1: Tx buffer DMA enabled 1 1 read-write TXDMAEN Disabled Tx buffer DMA disabled 0 Enabled Tx buffer DMA enabled 1 SSOE SS output enable - 0: SS output is disabled in master mode and the SPI interface can work in multimaster configuration - 1: SS output is enabled in master mode and when the SPI interface is enabled. The SPI interface cannot work in a multimaster environment. 2 1 read-write SSOE Disabled SS output is disabled in master mode 0 Enabled SS output is enabled in master mode 1 NSSP NSS pulse management This bit is used in master mode only. it allow the SPI to generate an NSS pulse between two consecutive data when doing continuous transfers. In the case of a single data transfer, it forces the NSS pin high level after the transfer. It has no meaning if CPHA = 1, or FRF = 1. - 0: No NSS pulse - 1: NSS pulse generated 3 1 read-write NSSP NoPulse No NSS pulse 0 PulseGenerated NSS pulse generated 1 FRF Frame format - 0: SPI Motorola mode - 1 SPI TI mode 4 1 read-write FRF Motorola SPI Motorola mode 0 TI SPI TI mode 1 ERRIE Error interrupt enable This bit controls the generation of an interrupt when an error condition occurs (CRCERR, OVR, MODF in SPI mode, FRE at TI mode and UDR, OVR, and FRE in I2S mode). - 0: Error interrupt is masked - 1: Error interrupt is enabled 5 1 read-write ERRIE Masked Error interrupt masked 0 NotMasked Error interrupt not masked 1 RXNEIE RX buffer not empty interrupt enable - 0: RXNE interrupt masked - 1: RXNE interrupt not masked. Used to generate an interrupt request when the RXNE flag is set. 6 1 read-write RXNEIE Masked RXE interrupt masked 0 NotMasked RXE interrupt not masked 1 TXEIE Tx buffer empty interrupt enable - 0: TXE interrupt masked - 1: TXE interrupt not masked. Used to generate an interrupt request when the TXE flag is set. 7 1 read-write TXEIE Masked TXE interrupt masked 0 NotMasked TXE interrupt not masked 1 DS Data size These bits configure the data length for SPI transfers: - 0000: Not used - 0001: Not used - 0010: Not used - 0011: 4-bit - 0100: 5-bit - 0101: 6-bit - 0110: 7-bit - 0111: 8-bit - 1000: 9-bit - 1001: 10-bit - 1010: 11-bit - 1011: 12-bit - 1100: 13-bit - 1101: 14-bit - 1110: 15-bit - 1111: 16-bit If software attempts to write one of the Not used values, they are forced to the value 0111(8-bit). 8 4 read-write DS FourBit 4-bit 3 FiveBit 5-bit 4 SixBit 6-bit 5 SevenBit 7-bit 6 EightBit 8-bit 7 NineBit 9-bit 8 TenBit 10-bit 9 ElevenBit 11-bit 10 TwelveBit 12-bit 11 ThirteenBit 13-bit 12 FourteenBit 14-bit 13 FifteenBit 15-bit 14 SixteenBit 16-bit 15 FRXTH FIFO reception threshold FRXTH shall be set according the read access (16-bit or 8-bit) to the FIFO. This bit is used to set the threshold of the RXFIFO that triggers an RXNE event - 0: RXNE event is generated if the FIFO level is greater than or equal to 1/2 (16-bit) - 1: RXNE event is generated if the FIFO level is greater than or equal to 1/4 (8-bit) 12 1 read-write FRXTH Half RXNE event is generated if the FIFO level is greater than or equal to 1/2 (16-bit) 0 Quarter RXNE event is generated if the FIFO level is greater than or equal to 1/4 (8-bit) 1 LDMA_RX Last DMA transfer for reception This bit is used in data packing mode, to define if the total number of data to receive by DMA is odd or even. It has significance only if the RXDMAEN bit in the SPIx_CR2 register is set and if packing mode is used (data length =< 8-bit and write access to SPIx_DR is 16-bit wide). It has to be written when the SPI is disabled (SPE = 0 in the SPIx_CR1 register). - 0: Number of data to transfer is even - 1: Number of data to transfer is odd 13 1 read-write LDMA_RX Even Number of data to transfer for receive is even 0 Odd Number of data to transfer for receive is odd 1 LDMA_TX Last DMA transfer for transmission This bit is used in data packing mode, to define if the total number of data to transmit by DMA is odd or even. It has significance only if the TXDMAEN bit in the SPIx_CR2 register is set and if packing mode is used (data length =< 8-bit and write access to SPIx_DR is 16-bit wide). It has to be written when the SPI is disabled (SPE = 0 in the SPIx_CR1 register). - 0: Number of data to transfer is even - 1: Number of data to transfer is odd 14 1 read-write LDMA_TX Even Number of data to transfer for transmit is even 0 Odd Number of data to transfer for transmit is odd 1 SR SR SPI1_SR register 0x8 0x10 read-write 0x00000002 RXNE Receive buffer not empty - 0: Rx buffer empty - 1: Rx buffer not empty 0 1 read-only RXNE Empty Rx buffer empty 0 NotEmpty Rx buffer not empty 1 TXE Transmit buffer empty - 0: No more empty space in Tx buffer. (software shall not write data to the Tx buffer). - 1: At least one empty space in Tx buffer. (software may write data to the Tx buffer). 1 1 read-only TXE NotEmpty Tx buffer not empty 0 Empty Tx buffer empty 1 CHSIDE Channel side - 0: Channel Left has to be transmitted or has been received - 1: Channel Right has to be transmitted or has been received 2 1 read-only CHSIDE Left Channel left has to be transmitted or has been received 0 Right Channel right has to be transmitted or has been received 1 UDR Underrun flag - 0: No underrun occurred - 1: Underrun occurred 3 1 read-only UDRR NoUnderrun No underrun occurred 0 Underrun Underrun occurred 1 CRCERR CRC error flag - 0: CRC value received matches the SPIx_RXCRCR value - 1: CRC value received does not match the SPIx_RXCRCR value This flag is set by hardware and cleared by software writing 0. 4 1 read-write zeroToClear CRCERRR read Match CRC value received matches the SPIx_RXCRCR value 0 NoMatch CRC value received does not match the SPIx_RXCRCR value 1 CRCERRW write Clear Clear flag 0 MODF Mode fault - 0: No mode fault occurred - 1: Mode fault occurred 5 1 read-only MODFR NoFault No mode fault occurred 0 Fault Mode fault occurred 1 OVR Overrun flag - 0: No overrun occurred - 1: Overrun occurred 6 1 read-only OVRR NoOverrun No overrun occurred 0 Overrun Overrun occurred 1 BSY Busy flag - 0: SPI (or I2S) not busy - 1: SPI (or I2S) is busy in communication or Tx buffer is not empty This flag is set and cleared by hardware. 7 1 read-only BSYR NotBusy SPI not busy 0 Busy SPI busy 1 FRE Frame format error This flag is used for SPI in TI slave mode and I2S slave mode. Refer to Section 18.5.10: SPI error flags and Section 18.7.6: I2S error flags. This flag is set by hardware and reset when SPIx_SR is read by software. - 0: No frame format error - 1: A frame format error occurred 8 1 read-only FRER NoError No frame format error 0 Error A frame format error occurred 1 FRLVL FIFO reception level These bits are set and cleared by hardware. - 00: FIFO empty - 01: 1/4 FIFO - 10: 1/2 FIFO - 11: FIFO full 9 2 read-only FRLVLR Empty Rx FIFO Empty 0 Quarter Rx 1/4 FIFO 1 Half Rx 1/2 FIFO 2 Full Rx FIFO full 3 FTLVL FIFO Transmission Level These bits are set and cleared by hardware. - 00: FIFO empty - 01: 1/4 FIFO - 10: 1/2 FIFO - 11: FIFO full (considered as FULL when the FIFO threshold is greater than 1/2) 11 2 read-only FTLVLR Empty Tx FIFO Empty 0 Quarter Tx 1/4 FIFO 1 Half Tx 1/2 FIFO 2 Full Tx FIFO full 3 DR DR SPI1_DR register 0xC 0x10 read-write 0x00000000 DR Data register Data received or to be transmitted The data register serves as an interface between the Rx and Tx FIFOs. When the data register is read, RxFIFO is accessed while the write to data register accesses TxFIFO (See Section 18.5.8: Data transmission and reception procedures). Note: Data is always right-aligned. Unused bits are ignored when writing to the register, and read as zero when the register is read. The Rx threshold setting must always correspond with the read access currently used. 0 16 read-write 0 65535 DR8 Direct 8-bit access to data register DR 0xC 0x8 read-write DR Data register 0 8 0 255 CRCPR CRCPR SPI1_CRCPR register 0x10 0x10 read-write 0x00000007 CRCPOLY CRC polynomial register This register contains the polynomial for the CRC calculation. The CRC polynomial (0007h) is the reset value of this register. Another polynomial can be configured as required. 0 16 read-write 0 65535 RXCRCR RXCRCR SPI1_RXCRCR register 0x14 0x10 read-only 0x00000000 RXCRC Rx CRC register When CRC calculation is enabled, the RxCRC[15:0] bits contain the computed CRC value of the subsequently received bytes. This register is reset when the CRCEN bit in SPIx_CR1 register is written to 1. The CRC is calculated serially using the polynomial programmed in the SPIx_CRCPR register. Only the 8 LSB bits are considered when the data frame format is set to be 8-bit data (CRCL bit in the SPIx_CR1 is cleared). CRC calculation is done based on any CRC8 standard. The entire 16-bits of this register are considered when a 16-bit data frame format is selected (CRCL bit in the SPIx_CR1 register is set). CRC calculation is done based on any CRC16 standard. A read to this register when the BSY Flag is set could return an incorrect value. 0 16 read-only 0 65535 TXCRCR TXCRCR SPI1_TXCRCR register 0x18 0x10 read-only 0x00000000 TXCRC Tx CRC register When CRC calculation is enabled, the TxCRC[7:0] bits contain the computed CRC value of the subsequently transmitted bytes. This register is reset when the CRCEN bit of SPIx_CR1 is written to 1. The CRC is calculated serially using the polynomial programmed in the Tx CRC register When CRC calculation is enabled, the TxCRC[7:0] bits contain the computed CRC value of the subsequently transmitted bytes. This register is reset when the CRCEN bit of SPIx_CR1 is written to 1. The CRC is calculated serially using the polynomial programmed in the SPIx_CRCPR register. Only the 8 LSB bits are considered when the data frame format is set to be 8-bit data (CRCL bit in the SPIx_CR1 is cleared). CRC calculation is done based on any CRC8 standard. The entire 16-bits of this register are considered when a 16-bit data frame format is selected (CRCL bit in the SPIx_CR1 register is set). CRC calculation is done based on any CRC16 standard. Note: A read to this register when the BSY flag is set could return an incorrect value. These bits are not used in I2S mode. 0 16 read-only 0 65535 I2SCFGR I2SCFGR SPI1_I2SCFGR register 0x1C 0x10 read-write 0x00000000 CHLEN Channel length (number of bits per audio channel) - 0: 16-bit wide - 1: 32-bit wide The bit write operation has a meaning only if DATLEN = 00 otherwise the channel length is fixed to 32-bit by hardware whatever the value filled in. 0 1 read-write CHLEN SixteenBit 16-bit wide 0 ThirtyTwoBit 32-bit wide 1 DATLEN Data length to be transferred - 00: 16-bit data length - 01: 24-bit data length - 10: 32-bit data length - 11: Not allowed 1 2 read-write DATLEN SixteenBit 16-bit data length 0 TwentyFourBit 24-bit data length 1 ThirtyTwoBit 32-bit data length 2 CKPOL Steady state clock polarity - 0: I2S clock steady state is low level - 1: I2S clock steady state is high level 3 1 read-write CKPOL IdleLow I2S clock inactive state is low level 0 IdleHigh I2S clock inactive state is high level 1 I2SSTD I2S standard selection - 00: I2S Philips standard. - 01: MSB justified standard (left justified) - 10: LSB justified standard (right justified) - 11: PCM standard 4 2 read-write I2SSTD Philips I2S Philips standard 0 MSB MSB justified standard 1 LSB LSB justified standard 2 PCM PCM standard 3 PCMSYNC PCM frame synchronization - 0: Short frame synchronization - 1: Long frame synchronization Note: This bit has a meaning only if I2SSTD = 11 (PCM standard is used). It is not used in SPI mode. 7 1 read-write PCMSYNC Short Short frame synchronisation 0 Long Long frame synchronisation 1 I2SCFG I2S configuration mode - 00: Slave - transmit - 01: Slave - receive - 10: Master - transmit - 11: Master - receive 8 2 read-write I2SCFG SlaveTx Slave - transmit 0 SlaveRx Slave - receive 1 MasterTx Master - transmit 2 MasterRx Master - receive 3 I2SE I2S enable - 0: I2S peripheral is disabled - 1: I2S peripheral is enabled Note: This bit is not used in SPI mode. 10 1 read-write I2SE Disabled I2S peripheral is disabled 0 Enabled I2S peripheral is enabled 1 I2SMOD I2S mode selection - 0: SPI mode is selected - 1: I2S mode is selected Note: This bit should be configured when the SPI is disabled. 11 1 read-write I2SMOD SPIMode SPI mode is selected 0 I2SMode I2S mode is selected 1 ASTREN Asynchronous start enable. - 0: The Asynchronous start is disabled. When the I2S is enabled in slave mode, the I2S slave starts the transfer when the I2S clock is received and an appropriate transition (depending on the protocol selected) is detected on the WS signal. - 1: The Asynchronous start is enabled. When the I2S is enabled in slave mode, the I2S slave starts immediately the transfer when the I2S clock is received from the master without checking the expected transition of WS signal. Note: The appropriate transition is a falling edge on WS signal when I2S Philips Standard is used, or a rising edge for other standards. 12 1 read-write I2SPR I2SPR SPI1_I2SPR register 0x20 0x10 read-write 0x00000002 I2SDIV I2S linear prescaler I2SDIV [7:0] = 0 or I2SDIV [7:0] = 1 are forbidden values. 0 8 read-write 2 255 ODD Odd factor for the prescaler - 0: Real divider value is = I2SDIV *2 - 1: Real divider value is = (I2SDIV * 2)+1 8 1 read-write ODD Even Real divider value is I2SDIV * 2 0 Odd Real divider value is (I2SDIV * 2) + 1 1 MCKOE Master clock output enable - 0: Master clock output is disabled - 1: Master clock output is enabled 9 1 read-write MCKOE Disabled Master clock output is disabled 0 Enabled Master clock output is enabled 1 SPI3 SPI address block description SPI 0x41007000 SPI3 SPI3 interrupt 7 USART USART address block description USART 0x41004000 0x0 0x400 registers USART USART interrupt 8 TIM17 TIM16 interrupt 27 CR1 CR1 USART control register 1 0x0 0x20 read-write 0x00000000 0xFFFFFFFF UE USART enable When this bit is cleared, the USART prescalers and outputs are stopped immediately, and all current operations are discarded. The USART configuration is kept, but all the USART_ISR status flags are reset. This bit is set and cleared by software. Note: To enter low-power mode without generating errors on the line, the TE bit must be previously reset and the software must wait for the TC bit in the USART_ISR to be set before resetting the UE bit. Note: The DMA requests are also reset when UE = 0 so the DMA channel must be disabled before resetting the UE bit. Note: In Smartcard mode, (SCEN = 1), the CK is always available when CLKEN = 1, regardless of the UE bit value. 0 1 read-write UE Disabled UART is disabled 0 Enabled UART is enabled 1 UESM USART enable in low-power mode When this bit is cleared, the USART cannot wake up the MCU from low-power mode. When this bit is set, the USART can wake up the MCU from low-power mode. This bit is set and cleared by software. Note: It is recommended to set the UESM bit just before entering low-power mode and clear it when exit from low-power mode. Note: If the USART does not support the wakeup from Stop feature, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 1 1 read-write UESM Disabled USART not able to wake up the MCU from Stop mode 0 Enabled USART able to wake up the MCU from Stop mode 1 RE Receiver enable This bit enables the receiver. It is set and cleared by software. 2 1 read-write RE Disabled Receiver is disabled 0 Enabled Receiver is enabled 1 TE Transmitter enable This bit enables the transmitter. It is set and cleared by software. Note: During transmission, a low pulse on the TE bit ('0' followed by '1') sends a preamble (idle line) after the current word, except in Smartcard mode. In order to generate an idle character, the TE must not be immediately written to '1'. To ensure the required duration, the software can poll the TEACK bit in the USART_ISR register. Note: In Smartcard mode, when TE is set, there is a 1 bit-time delay before the transmission starts. 3 1 read-write TE Disabled Transmitter is disabled 0 Enabled Transmitter is enabled 1 IDLEIE IDLE interrupt enable This bit is set and cleared by software. 4 1 read-write IDLEIE Disabled Interrupt is disabled 0 Enabled Interrupt is generated whenever IDLE=1 in the ISR register 1 RXNEIE RXFIFO not empty interrupt enable This bit is set and cleared by software. 5 1 read-write RXNEIE Disabled Interrupt is disabled 0 Enabled Interrupt is generated whenever ORE=1 or RXNE=1 in the ISR register 1 TCIE Transmission complete interrupt enable This bit is set and cleared by software. 6 1 read-write TCIE Disabled Interrupt is disabled 0 Enabled Interrupt is generated whenever TC=1 in the ISR register 1 TXEIE TXFIFO not full interrupt enable This bit is set and cleared by software. 7 1 read-write TXEIE Disabled Interrupt is disabled 0 Enabled Interrupt is generated whenever TXE=1 in the ISR register 1 PEIE PE interrupt enable This bit is set and cleared by software. 8 1 read-write PEIE Disabled Interrupt is disabled 0 Enabled Interrupt is generated whenever PE=1 in the ISR register 1 PS Parity selection This bit selects the odd or even parity when the parity generation/detection is enabled (PCE bit set). It is set and cleared by software. The parity is selected after the current byte. This bitfield can only be written when the USART is disabled (UE=0). 9 1 read-write PS Even Even parity 0 Odd Odd parity 1 PCE Parity control enable This bit selects the hardware parity control (generation and detection). When the parity control is enabled, the computed parity is inserted at the MSB position (9th bit if M=1; 8th bit if M=0) and the parity is checked on the received data. This bit is set and cleared by software. Once it is set, PCE is active after the current byte (in reception and in transmission). This bitfield can only be written when the USART is disabled (UE=0). 10 1 read-write PCE Disabled Parity control disabled 0 Enabled Parity control enabled 1 WAKE Receiver wakeup method This bit determines the USART wakeup method from Mute mode. It is set or cleared by software. This bitfield can only be written when the USART is disabled (UE=0). 11 1 read-write WAKE Idle Idle line 0 Address Address mask 1 M0 Word length This bit is used in conjunction with bit 28 (M1) to determine the word length. It is set or cleared by software (refer to bit 28 (M1)description). This bit can only be written when the USART is disabled (UE=0). 12 1 read-write M0 Bit8 1 start bit, 8 data bits, n stop bits 0 Bit9 1 start bit, 9 data bits, n stop bits 1 MME Mute mode enable This bit enables the USART Mute mode function. When set, the USART can switch between active and Mute mode, as defined by the WAKE bit. It is set and cleared by software. 13 1 read-write MME Disabled Receiver in active mode permanently 0 Enabled Receiver can switch between mute mode and active mode 1 CMIE Character match interrupt enable This bit is set and cleared by software. 14 1 read-write CMIE Disabled Interrupt is disabled 0 Enabled Interrupt is generated when the CMF bit is set in the ISR register 1 OVER8 Oversampling mode This bit can only be written when the USART is disabled (UE=0). Note: In LIN, IrDA and Smartcard modes, this bit must be kept cleared. 15 1 read-write OVER8 Oversampling16 Oversampling by 16 0 Oversampling8 Oversampling by 8 1 DEDT Driver Enable deassertion time This 5-bit value defines the time between the end of the last stop bit, in a transmitted message, and the de-activation of the DE (Driver Enable) signal. It is expressed in sample time units (1/8 or 1/16 bit time, depending on the oversampling rate). If the USART_TDR register is written during the DEDT time, the new data is transmitted only when the DEDT and DEAT times have both elapsed. This bitfield can only be written when the USART is disabled (UE=0). Note: If the Driver Enable feature is not supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 16 5 read-write 0 31 DEAT Driver Enable assertion time This 5-bit value defines the time between the activation of the DE (Driver Enable) signal and the beginning of the start bit. It is expressed in sample time units (1/8 or 1/16 bit time, depending on the oversampling rate). This bitfield can only be written when the USART is disabled (UE=0). Note: If the Driver Enable feature is not supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 21 5 read-write 0 31 RTOIE Receiver timeout interrupt enable This bit is set and cleared by software. Note: If the USART does not support the Receiver timeout feature, this bit is reserved and must be kept at reset value. Section53.4: USART implementation on page2587. 26 1 read-write RTOIE Disabled Interrupt is inhibited 0 Enabled An USART interrupt is generated when the RTOF bit is set in the ISR register 1 EOBIE End of Block interrupt enable This bit is set and cleared by software. Note: If the USART does not support Smartcard mode, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 27 1 read-write EOBIE Disabled Interrupt is inhibited 0 Enabled A USART interrupt is generated when the EOBF flag is set in the ISR register 1 M1 Word length This bit must be used in conjunction with bit 12 (M0) to determine the word length. It is set or cleared by software. M[1:0] = '00': 1 start bit, 8 Data bits, n Stop bit M[1:0] = '01': 1 start bit, 9 Data bits, n Stop bit M[1:0] = '10': 1 start bit, 7 Data bits, n Stop bit This bit can only be written when the USART is disabled (UE=0). Note: In 7-bits data length mode, the Smartcard mode, LIN master mode and Auto baud rate (0x7F and 0x55 frames detection) are not supported. 28 1 read-write M1 M0 Use M0 to set the data bits 0 Bit7 1 start bit, 7 data bits, n stop bits 1 FIFOEN FIFO mode enable This bit is set and cleared by software. This bitfield can only be written when the USART is disabled (UE=0). Note: FIFO mode can be used on standard UART communication, in SPI master/slave mode and in Smartcard modes only. It must not be enabled in IrDA and LIN modes. 29 1 read-write FIFOEN Disabled FIFO mode is disabled 0 Enabled FIFO mode is enabled 1 TXFEIE TXFIFO empty interrupt enable This bit is set and cleared by software. 30 1 read-write TXFEIE Disabled Interrupt inhibited 0 Enabled USART interrupt generated when TXFE = 1 in the USART_ISR register 1 RXFFIE RXFIFO Full interrupt enable This bit is set and cleared by software. 31 1 read-write RXFFIE Disabled Interrupt inhibited 0 Enabled USART interrupt generated when RXFF = 1 in the USART_ISR register 1 CR2 CR2 USART control register 2 0x4 0x20 read-write 0x00000000 0xFFFFFFFF SLVEN Synchronous Slave mode enable When the SLVEN bit is set, the synchronous slave mode is enabled. Note: When SPI slave mode is not supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 0 1 read-write SLVEN Disabled Slave mode disabled 0 Enabled Slave mode enabled 1 DIS_NSS When the DIS_NSS bit is set, the NSS pin input is ignored. Note: When SPI slave mode is not supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 3 1 read-write DIS_NSS Disabled SPI slave selection depends on NSS input pin 0 Enabled SPI slave is always selected and NSS input pin is ignored 1 ADDM7 7-bit Address Detection/4-bit Address Detection This bit is for selection between 4-bit address detection or 7-bit address detection. This bit can only be written when the USART is disabled (UE=0) Note: In 7-bit and 9-bit data modes, the address detection is done on 6-bit and 8-bit address (ADD[5:0] and ADD[7:0]) respectively. 4 1 read-write ADDM7 Bit4 4-bit address detection 0 Bit7 7-bit address detection 1 LBDL LIN break detection length This bit is for selection between 11 bit or 10 bit break detection. This bit can only be written when the USART is disabled (UE=0). Note: If LIN mode is not supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 5 1 read-write LBDL Bit10 10-bit break detection 0 Bit11 11-bit break detection 1 LBDIE LIN break detection interrupt enable Break interrupt mask (break detection using break delimiter). Note: If LIN mode is not supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 6 1 read-write LBDIE Disabled Interrupt is inhibited 0 Enabled An interrupt is generated whenever LBDF=1 in the ISR register 1 LBCL Last bit clock pulse This bit is used to select whether the clock pulse associated with the last data bit transmitted (MSB) has to be output on the CK pin in synchronous mode. The last bit is the 7th or 8th or 9th data bit transmitted depending on the 7 or 8 or 9 bit format selected by the M bit in the USART_CR1 register. This bit can only be written when the USART is disabled (UE=0). Note: If synchronous mode is not supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 8 1 read-write LBCL NotOutput The clock pulse of the last data bit is not output to the CK pin 0 Output The clock pulse of the last data bit is output to the CK pin 1 CPHA Clock phase This bit is used to select the phase of the clock output on the CK pin in synchronous mode. It works in conjunction with the CPOL bit to produce the desired clock/data relationship (see Figure589 and Figure590) This bit can only be written when the USART is disabled (UE=0). Note: If synchronous mode is not supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 9 1 read-write CPHA First The first clock transition is the first data capture edge 0 Second The second clock transition is the first data capture edge 1 CPOL Clock polarity This bit enables the user to select the polarity of the clock output on the CK pin in synchronous mode. It works in conjunction with the CPHA bit to produce the desired clock/data relationship This bit can only be written when the USART is disabled (UE=0). Note: If synchronous mode is not supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 10 1 read-write CPOL Low Steady low value on CK pin outside transmission window 0 High Steady high value on CK pin outside transmission window 1 CLKEN Clock enable This bit enables the user to enable the CK pin. This bit can only be written when the USART is disabled (UE=0). Note: If neither synchronous mode nor Smartcard mode is supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. In Smartcard mode, in order to provide correctly the CK clock to the smartcard, the steps below must be respected: UE = 0 SCEN = 1 GTPR configuration CLKEN= 1 Note: UE = 1 11 1 read-write CLKEN Disabled CK pin disabled 0 Enabled CK pin enabled 1 STOP stop bits These bits are used for programming the stop bits. This bitfield can only be written when the USART is disabled (UE=0). 12 2 read-write STOP Stop1 1 stop bit 0 Stop0p5 0.5 stop bit 1 Stop2 2 stop bit 2 Stop1p5 1.5 stop bit 3 LINEN LIN mode enable This bit is set and cleared by software. The LIN mode enables the capability to send LIN synchronous breaks (13 low bits) using the SBKRQ bit in the USART_CR1 register, and to detect LIN Sync breaks. This bitfield can only be written when the USART is disabled (UE=0). Note: If the USART does not support LIN mode, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 14 1 read-write LINEN Disabled LIN mode disabled 0 Enabled LIN mode enabled 1 SWAP Swap TX/RX pins This bit is set and cleared by software. This bitfield can only be written when the USART is disabled (UE=0). 15 1 read-write SWAP Standard TX/RX pins are used as defined in standard pinout 0 Swapped The TX and RX pins functions are swapped 1 RXINV RX pin active level inversion This bit is set and cleared by software. This enables the use of an external inverter on the RX line. This bitfield can only be written when the USART is disabled (UE=0). 16 1 read-write RXINV Standard RX pin signal works using the standard logic levels 0 Inverted RX pin signal values are inverted 1 TXINV TX pin active level inversion This bit is set and cleared by software. This enables the use of an external inverter on the TX line. This bitfield can only be written when the USART is disabled (UE=0). 17 1 read-write TXINV Standard TX pin signal works using the standard logic levels 0 Inverted TX pin signal values are inverted 1 DATAINV Binary data inversion This bit is set and cleared by software. This bitfield can only be written when the USART is disabled (UE=0). 18 1 read-write DATAINV Positive Logical data from the data register are send/received in positive/direct logic 0 Negative Logical data from the data register are send/received in negative/inverse logic 1 MSBFIRST Most significant bit first This bit is set and cleared by software. This bitfield can only be written when the USART is disabled (UE=0). 19 1 read-write MSBFIRST LSB data is transmitted/received with data bit 0 first, following the start bit 0 MSB data is transmitted/received with MSB (bit 7/8/9) first, following the start bit 1 ABREN Auto baud rate enable This bit is set and cleared by software. Note: If the USART does not support the auto baud rate feature, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 20 1 read-write ABREN Disabled Auto baud rate detection is disabled 0 Enabled Auto baud rate detection is enabled 1 ABRMOD Auto baud rate mode These bits are set and cleared by software. This bitfield can only be written when ABREN = 0 or the USART is disabled (UE=0). Note: If DATAINV=1 and/or MSBFIRST=1 the patterns must be the same on the line, for example 0xAA for MSBFIRST) Note: If the USART does not support the auto baud rate feature, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 21 2 read-write ABRMOD Start Measurement of the start bit is used to detect the baud rate 0 Edge Falling edge to falling edge measurement 1 Frame7F 0x7F frame detection 2 Frame55 0x55 frame detection 3 RTOEN Receiver timeout enable This bit is set and cleared by software. When this feature is enabled, the RTOF flag in the USART_ISR register is set if the RX line is idle (no reception) for the duration programmed in the RTOR (receiver timeout register). Note: If the USART does not support the Receiver timeout feature, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 23 1 read-write RTOEN Disabled Receiver timeout feature disabled 0 Enabled Receiver timeout feature enabled 1 ADD Address of the USART node These bits give the address of the USART node in Mute mode or a character code to be recognized in low-power or Run mode: In Mute mode: they are used in multiprocessor communication to wakeup from Mute mode with 4-bit/7-bit address mark detection. The MSB of the character sent by the transmitter should be equal to 1. In 4-bit address mark detection, only ADD[3:0] bits are used. In low-power mode: they are used for wake up from low-power mode on character match. When WUS[1:0] is programmed to 0b00 (WUF active on address match), the wakeup from low-power mode is performed when the received character corresponds to the character programmed through ADD[6:0] or ADD[3:0] bitfield (depending on ADDM7 bit), and WUF interrupt is enabled by setting WUFIE bit. The MSB of the character sent by transmitter should be equal to 1. In Run mode with Mute mode inactive (for example, end-of-block detection in ModBus protocol): the whole received character (8 bits) is compared to ADD[7:0] value and CMF flag is set on match. An interrupt is generated if the CMIE bit is set. These bits can only be written when the reception is disabled (RE=0) or when the USART is disabled (UE=0). 24 8 read-write 0 255 CR3 CR3 USART control register 3 0x8 0x20 read-write 0x00000000 0xFFFFFFFF EIE Error interrupt enable Error Interrupt Enable Bit is required to enable interrupt generation in case of a framing error, overrun error noise flag or SPI slave underrun error (FE=1 or ORE=1 or NE=1 or UDR = 1 in the USART_ISR register). 0 1 read-write EIE Disabled Interrupt is inhibited 0 Enabled An interrupt is generated when FE=1 or ORE=1 or NF=1 in the ISR register 1 IREN IrDA mode enable This bit is set and cleared by software. This bit can only be written when the USART is disabled (UE=0). Note: If IrDA mode is not supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 1 1 read-write IREN Disabled IrDA disabled 0 Enabled IrDA enabled 1 IRLP IrDA low-power This bit is used for selecting between normal and low-power IrDA modes This bit can only be written when the USART is disabled (UE=0). Note: If IrDA mode is not supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 2 1 read-write IRLP Normal Normal mode 0 LowPower Low-power mode 1 HDSEL Half-duplex selection Selection of Single-wire Half-duplex mode This bit can only be written when the USART is disabled (UE=0). 3 1 read-write HDSEL NotSelected Half duplex mode is not selected 0 Selected Half duplex mode is selected 1 NACK Smartcard NACK enable This bitfield can only be written when the USART is disabled (UE=0). Note: If the USART does not support Smartcard mode, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 4 1 read-write NACK Disabled NACK transmission in case of parity error is disabled 0 Enabled NACK transmission during parity error is enabled 1 SCEN Smartcard mode enable This bit is used for enabling Smartcard mode. This bitfield can only be written when the USART is disabled (UE=0). Note: If the USART does not support Smartcard mode, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 5 1 read-write SCEN Disabled Smartcard Mode disabled 0 Enabled Smartcard Mode enabled 1 DMAR DMA enable receiver This bit is set/reset by software 6 1 read-write DMAR Disabled DMA mode is disabled for reception 0 Enabled DMA mode is enabled for reception 1 DMAT DMA enable transmitter This bit is set/reset by software 7 1 read-write DMAT Disabled DMA mode is disabled for transmission 0 Enabled DMA mode is enabled for transmission 1 RTSE RTS enable This bit can only be written when the USART is disabled (UE=0). Note: If the hardware flow control feature is not supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 8 1 read-write RTSE Disabled RTS hardware flow control disabled 0 Enabled RTS output enabled, data is only requested when there is space in the receive buffer 1 CTSE CTS enable This bit can only be written when the USART is disabled (UE=0) Note: If the hardware flow control feature is not supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 9 1 read-write CTSE Disabled CTS hardware flow control disabled 0 Enabled CTS mode enabled, data is only transmitted when the CTS input is asserted 1 CTSIE CTS interrupt enable Note: If the hardware flow control feature is not supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 10 1 read-write CTSIE Disabled Interrupt is inhibited 0 Enabled An interrupt is generated whenever CTSIF=1 in the ISR register 1 ONEBIT One sample bit method enable This bit enables the user to select the sample method. When the one sample bit method is selected the noise detection flag (NE) is disabled. This bit can only be written when the USART is disabled (UE=0). 11 1 read-write ONEBIT Sample3 Three sample bit method 0 Sample1 One sample bit method 1 OVRDIS Overrun Disable This bit is used to disable the receive overrun detection. the ORE flag is not set and the new received data overwrites the previous content of the USART_RDR register. When FIFO mode is enabled, the RXFIFO is bypassed and data is written directly in USART_RDR register. Even when FIFO management is enabled, the RXNE flag is to be used. This bit can only be written when the USART is disabled (UE=0). Note: This control bit enables checking the communication flow w/o reading the data 12 1 read-write OVRDIS Enabled Overrun Error Flag, ORE, is set when received data is not read before receiving new data 0 Disabled Overrun functionality is disabled. If new data is received while the RXNE flag is still set the ORE flag is not set and the new received data overwrites the previous content of the RDR register 1 DDRE DMA Disable on Reception Error This bit can only be written when the USART is disabled (UE=0). Note: The reception errors are: parity error, framing error or noise error. 13 1 read-write DDRE NotDisabled DMA is not disabled in case of reception error 0 Disabled DMA is disabled following a reception error 1 DEM Driver enable mode This bit enables the user to activate the external transceiver control, through the DE signal. This bit can only be written when the USART is disabled (UE=0). Note: If the Driver Enable feature is not supported, this bit is reserved and must be kept at reset value. Section53.4: USART implementation on page2587. 14 1 read-write DEM Disabled DE function is disabled 0 Enabled The DE signal is output on the RTS pin 1 DEP Driver enable polarity selection This bit can only be written when the USART is disabled (UE=0). Note: If the Driver Enable feature is not supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 15 1 read-write DEP High DE signal is active high 0 Low DE signal is active low 1 SCARCNT Smartcard auto-retry count This bitfield specifies the number of retries for transmission and reception in Smartcard mode. In transmission mode, it specifies the number of automatic retransmission retries, before generating a transmission error (FE bit set). In reception mode, it specifies the number or erroneous reception trials, before generating a reception error (RXNE/RXFNE and PE bits set). This bitfield must be programmed only when the USART is disabled (UE=0). When the USART is enabled (UE=1), this bitfield may only be written to 0x0, in order to stop retransmission. 0x1 to 0x7: number of automatic retransmission attempts (before signaling error) Note: If Smartcard mode is not supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 17 3 read-write 0 7 WUS Wakeup from low-power mode interrupt flag selection This bitfield specifies the event which activates the WUF (Wakeup from low-power mode flag). This bitfield can only be written when the USART is disabled (UE=0). Note: If the USART does not support the wakeup from Stop feature, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 20 2 read-write WUS Address WUF active on address match 0 Start WuF active on Start bit detection 2 RXNE WUF active on RXNE 3 WUFIE Wakeup from low-power mode interrupt enable This bit is set and cleared by software. Note: WUFIE must be set before entering in low-power mode. Note: If the USART does not support the wakeup from Stop feature, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 22 1 read-write WUFIE Disabled Interrupt is inhibited 0 Enabled An USART interrupt is generated whenever WUF=1 in the ISR register 1 TXFTIE TXFIFO threshold interrupt enable This bit is set and cleared by software. 23 1 read-write TXFTIE Disabled Interrupt inhibited 0 Enabled USART interrupt generated when Transmit FIFO reaches the threshold programmed in TXFTCFG 1 TCBGTIE Transmission Complete before guard time, interrupt enable This bit is set and cleared by software. Note: If the USART does not support the Smartcard mode, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 24 1 read-write TCBGTIE Disabled Interrupt inhibited 0 Enabled USART interrupt generated whenever TCBGT=1 in the USART_ISR register 1 RXFTCFG Receive FIFO threshold configuration Remaining combinations: Reserved 25 3 read-write RXFTCFG Depth_1_8 RXFIFO reaches 1/8 of its depth 0 Depth_1_4 RXFIFO reaches 1/4 of its depth 1 Depth_1_2 RXFIFO reaches 1/2 of its depth 2 Depth_3_4 RXFIFO reaches 3/4 of its depth 3 Depth_7_8 RXFIFO reaches 7/8 of its depth 4 Full RXFIFO becomes full 5 RXFTIE RXFIFO threshold interrupt enable This bit is set and cleared by software. 28 1 read-write RXFTIE Disabled Interrupt inhibited 0 Enabled USART interrupt generated when Receive FIFO reaches the threshold programmed in RXFTCFG 1 TXFTCFG TXFIFO threshold configuration Remaining combinations: Reserved 29 3 read-write TXFTCFG Depth_1_8 TXFIFO reaches 1/8 of its depth 0 Depth_1_4 TXFIFO reaches 1/4 of its depth 1 Depth_1_2 TXFIFO reaches 1/2 of its depth 2 Depth_3_4 TXFIFO reaches 3/4 of its depth 3 Depth_7_8 TXFIFO reaches 7/8 of its depth 4 Empty TXFIFO becomes empty 5 BRR BRR USART baud rate register 0xC 0x20 read-write 0x00000000 0xFFFFFFFF BRR USART baud rate BRR[15:4] BRR[15:4] = USARTDIV[15:4] BRR[3:0] When OVER8 = 0, BRR[3:0] = USARTDIV[3:0]. When OVER8 = 1: BRR[2:0] = USARTDIV[3:0] shifted 1 bit to the right. BRR[3] must be kept cleared. 0 16 read-write 0 65535 GTPR GTPR USART guard time and prescaler register 0x10 0x20 read-write 0x00000000 0xFFFFFFFF PSC Prescaler value In IrDA low-power and normal IrDA mode: PSC[7:0] = IrDA Normal and Low-Power baud rate PSC[7:0] is used to program the prescaler for dividing the USART source clock to achieve the low-power frequency: the source clock is divided by the value given in the register (8 significant bits): In Smartcard mode: PSC[4:0]=Prescaler value PSC[4:0] is used to program the prescaler for dividing the USART source clock to provide the Smartcard clock. The value given in the register (5 significant bits) is multiplied by 2 to give the division factor of the source clock frequency: ... ... This bitfield can only be written when the USART is disabled (UE=0). Note: Bits [7:5] must be kept cleared if Smartcard mode is used. Note: This bitfield is reserved and forced by hardware to '0' when the Smartcard and IrDA modes are not supported. Refer to Section 53.4: USART implementation on page 2587. 0 8 read-write 0 255 GT Guard time value This bitfield is used to program the Guard time value in terms of number of baud clock periods. This is used in Smartcard mode. The Transmission Complete flag is set after this guard time value. This bitfield can only be written when the USART is disabled (UE=0). Note: If Smartcard mode is not supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 8 8 read-write 0 255 RTOR RTOR USART receiver timeout register 0x14 0x20 read-write 0x00000000 0xFFFFFFFF RTO Receiver timeout value This bitfield gives the Receiver timeout value in terms of number of bits during which there is no activity on the RX line. In standard mode, the RTOF flag is set if, after the last received character, no new start bit is detected for more than the RTO value. In Smartcard mode, this value is used to implement the CWT and BWT. See Smartcard chapter for more details. In the standard, the CWT/BWT measurement is done starting from the start bit of the last received character. Note: This value must only be programmed once per received character. 0 24 read-write 0 16777215 BLEN Block Length This bitfield gives the Block length in Smartcard T=1 Reception. Its value equals the number of information characters + the length of the Epilogue Field (1-LEC/2-CRC) - 1. Examples: BLEN = 0: 0 information characters + LEC BLEN = 1: 0 information characters + CRC BLEN = 255: 254 information characters + CRC (total 256 characters)) In Smartcard mode, the Block length counter is reset when TXE=0 (TXFE = 0 in case FIFO mode is enabled). This bitfield can be used also in other modes. In this case, the Block length counter is reset when RE=0 (receiver disabled) and/or when the EOBCF bit is written to 1. Note: This value can be programmed after the start of the block reception (using the data from the LEN character in the Prologue Field). It must be programmed only once per received block. 24 8 read-write 0 255 RQR RQR USART request register 0x18 0x20 write-only 0x00000000 0xFFFFFFFF ABRRQ Auto baud rate request Writing 1 to this bit resets the ABRF and ABRE flags in the USART_ISR and requests an automatic baud rate measurement on the next received data frame. Note: If the USART does not support the auto baud rate feature, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 0 1 write-only ABRRQ Request resets the ABRF flag in the USART_ISR and request an automatic baud rate measurement on the next received data frame 1 SBKRQ Send break request Writing 1 to this bit sets the SBKF flag and request to send a BREAK on the line, as soon as the transmit machine is available. Note: When the application needs to send the break character following all previously inserted data, including the ones not yet transmitted, the software should wait for the TXE flag assertion before setting the SBKRQ bit. 1 1 write-only SBKRQ Break sets the SBKF flag and request to send a BREAK on the line, as soon as the transmit machine is available 1 MMRQ Mute mode request Writing 1 to this bit puts the USART in Mute mode and resets the RWU flag. 2 1 write-only MMRQ Mute Puts the USART in mute mode and sets the RWU flag 1 RXFRQ Receive data flush request Writing 1 to this bit empties the entire receive FIFO i.e. clears the bit RXFNE. This enables to discard the received data without reading them, and avoid an overrun condition. 3 1 write-only RXFRQ Discard clears the RXNE flag. This allows to discard the received data without reading it, and avoid an overrun condition 1 TXFRQ Transmit data flush request When FIFO mode is disabled, writing '1' to this bit sets the TXE flag. This enables to discard the transmit data. This bit must be used only in Smartcard mode, when data have not been sent due to errors (NACK) and the FE flag is active in the USART_ISR register. If the USART does not support Smartcard mode, this bit is reserved and must be kept at reset value. When FIFO is enabled, TXFRQ bit is set to flush the whole FIFO. This sets the TXFE flag (Transmit FIFO empty, bit 23 in the USART_ISR register). Flushing the Transmit FIFO is supported in both UART and Smartcard modes. Note: In FIFO mode, the TXFNF flag is reset during the flush request until TxFIFO is empty in order to ensure that no data are written in the data register. 4 1 write-only TXFRQ Discard Set the TXE flags. This allows to discard the transmit data 1 ISR ISR USART interrupt and status register 0x1C 0x20 read-only 0x008000C0 0xF0FFFFFF PE Parity error This bit is set by hardware when a parity error occurs in receiver mode. It is cleared by software, writing 1 to the PECF in the USART_ICR register. An interrupt is generated if PEIE = 1 in the USART_CR1 register. Note: This error is associated with the character in the USART_RDR. 0 1 read-only PE NoError No parity error 0 Error Parity error 1 FE Framing error This bit is set by hardware when a de-synchronization, excessive noise or a break character is detected. It is cleared by software, writing 1 to the FECF bit in the USART_ICR register. When transmitting data in Smartcard mode, this bit is set when the maximum number of transmit attempts is reached without success (the card NACKs the data frame). An interrupt is generated if EIE=1 in the USART_CR3 register. Note: This error is associated with the character in the USART_RDR. 1 1 read-only FE NoError No Framing error is detected 0 Error Framing error or break character is detected 1 NE Noise detection flag This bit is set by hardware when noise is detected on a received frame. It is cleared by software, writing 1 to the NECF bit in the USART_ICR register. Note: This bit does not generate an interrupt as it appears at the same time as the RXFNE bit which itself generates an interrupt. An interrupt is generated when the NE flag is set during multi buffer communication if the EIE bit is set. Note: When the line is noise-free, the NE flag can be disabled by programming the ONEBIT bit to 1 to increase the USART tolerance to deviations (Refer to Section53.5.8: Tolerance of the USART receiver to clock deviation on page2604). Note: This error is associated with the character in the USART_RDR. 2 1 read-only NE NoNoise No noise is detected 0 Noise Noise is detected 1 ORE Overrun error This bit is set by hardware when the data currently being received in the shift register is ready to be transferred into the USART_RDR register while RXFF = 1. It is cleared by a software, writing 1 to the ORECF, in the USART_ICR register. An interrupt is generated if RXFNEIE=1 in the USART_CR1 register, or EIE = 1 in the USART_CR3 register. Note: When this bit is set, the USART_RDR register content is not lost but the shift register is overwritten. An interrupt is generated if the ORE flag is set during multi buffer communication if the EIE bit is set. Note: This bit is permanently forced to 0 (no overrun detection) when the bit OVRDIS is set in the USART_CR3 register. 3 1 read-only ORE NoOverrun No Overrun error 0 Overrun Overrun error is detected 1 IDLE Idle line detected This bit is set by hardware when an Idle Line is detected. An interrupt is generated if IDLEIE=1 in the USART_CR1 register. It is cleared by software, writing 1 to the IDLECF in the USART_ICR register. Note: The IDLE bit is not set again until the RXFNE bit has been set (i.e. a new idle line occurs). Note: If Mute mode is enabled (MME=1), IDLE is set if the USART is not mute (RWU=0), whatever the Mute mode selected by the WAKE bit. If RWU=1, IDLE is not set. 4 1 read-only IDLE NoIdle No Idle Line is detected 0 Idle Idle Line is detected 1 RXFNE RXFIFO not empty RXFNE bit is set by hardware when the RXFIFO is not empty, meaning that data can be read from the USART_RDR register. Every read operation from the USART_RDR frees a location in the RXFIFO. RXFNE is cleared when the RXFIFO is empty. The RXFNE flag can also be cleared by writing 1 to the RXFRQ in the USART_RQR register. An interrupt is generated if RXFNEIE=1 in the USART_CR1 register. 5 1 read-only RXFNE NoData Data is not received 0 DataReady Received data is ready to be read 1 TC Transmission complete This bit indicates that the last data written in the USART_TDR has been transmitted out of the shift register. It is set by hardware when the transmission of a frame containing data is complete and when TXFE is set. An interrupt is generated if TCIE=1 in the USART_CR1 register. TC bit is is cleared by software, by writing 1 to the TCCF in the USART_ICR register or by a write to the USART_TDR register. Note: If TE bit is reset and no transmission is on going, the TC bit is immediately set. 6 1 read-only TC TxNotComplete Transmission is not complete 0 TxComplete Transmission is complete 1 TXFNF TXFIFO not full TXFNF is set by hardware when TXFIFO is not full meaning that data can be written in the USART_TDR. Every write operation to the USART_TDR places the data in the TXFIFO. This flag remains set until the TXFIFO is full. When the TXFIFO is full, this flag is cleared indicating that data can not be written into the USART_TDR. An interrupt is generated if the TXFNFIE bit =1 in the USART_CR1 register. Note: The TXFNF is kept reset during the flush request until TXFIFO is empty. After sending the flush request (by setting TXFRQ bit), the flag TXFNF should be checked prior to writing in TXFIFO (TXFNF and TXFE are set at the same time). Note: This bit is used during single buffer transmission. 7 1 read-only TXFNF Full Transmit FIFO is full 0 NotFull Transmit FIFO is not full 1 LBDF LIN break detection flag This bit is set by hardware when the LIN break is detected. It is cleared by software, by writing 1 to the LBDCF in the USART_ICR. An interrupt is generated if LBDIE = 1 in the USART_CR2 register. Note: If the USART does not support LIN mode, this bit is reserved and kept at reset value. Refer to Section53.4: USART implementation on page2587. 8 1 read-only LBDF NotDetected LIN break not detected 0 Detected LIN break detected 1 CTSIF CTS interrupt flag This bit is set by hardware when the CTS input toggles, if the CTSE bit is set. It is cleared by software, by writing 1 to the CTSCF bit in the USART_ICR register. An interrupt is generated if CTSIE=1 in the USART_CR3 register. Note: If the hardware flow control feature is not supported, this bit is reserved and kept at reset value. 9 1 read-only CTSIF NotChanged No change occurred on the CTS status line 0 Changed A change occurred on the CTS status line 1 CTS CTS flag This bit is set/reset by hardware. It is an inverted copy of the status of the CTS input pin. Note: If the hardware flow control feature is not supported, this bit is reserved and kept at reset value. 10 1 read-only CTS Set CTS line set 0 Reset CTS line reset 1 RTOF Receiver timeout This bit is set by hardware when the timeout value, programmed in the RTOR register has lapsed, without any communication. It is cleared by software, writing 1 to the RTOCF bit in the USART_ICR register. An interrupt is generated if RTOIE=1 in the USART_CR2 register. In Smartcard mode, the timeout corresponds to the CWT or BWT timings. Note: If a time equal to the value programmed in RTOR register separates 2 characters, RTOF is not set. If this time exceeds this value + 2 sample times (2/16 or 2/8, depending on the oversampling method), RTOF flag is set. Note: The counter counts even if RE = 0 but RTOF is set only when RE = 1. If the timeout has already elapsed when RE is set, then RTOF is set. Note: If the USART does not support the Receiver timeout feature, this bit is reserved and kept at reset value. 11 1 read-only RTOF NotReached Timeout value not reached 0 Reached Timeout value reached without any data reception 1 EOBF End of block flag This bit is set by hardware when a complete block has been received (for example T=1 Smartcard mode). The detection is done when the number of received bytes (from the start of the block, including the prologue) is equal or greater than BLEN + 4. An interrupt is generated if the EOBIE=1 in the USART_CR1 register. It is cleared by software, writing 1 to the EOBCF in the USART_ICR register. Note: If Smartcard mode is not supported, this bit is reserved and kept at reset value. Refer to Section53.4: USART implementation on page2587. 12 1 read-only EOBF NotReached End of Block not reached 0 Reached End of Block (number of characters) reached 1 UDR SPI slave underrun error flag In slave transmission mode, this flag is set when the first clock pulse for data transmission appears while the software has not yet loaded any value into USART_TDR. This flag is reset by setting UDRCF bit in the USART_ICR register. Note: If the USART does not support the SPI slave mode, this bit is reserved and kept at reset value. Refer to Section53.4: USART implementation on page2587. 13 1 read-only UDR NoUnderrun No underrun error 0 Underrun underrun error 1 ABRE Auto baud rate error This bit is set by hardware if the baud rate measurement failed (baud rate out of range or character comparison failed) It is cleared by software, by writing 1 to the ABRRQ bit in the USART_RQR register. Note: If the USART does not support the auto baud rate feature, this bit is reserved and kept at reset value. 14 1 read-only ABRF Auto baud rate flag This bit is set by hardware when the automatic baud rate has been set (RXFNE is also set, generating an interrupt if RXFNEIE = 1) or when the auto baud rate operation was completed without success (ABRE=1) (ABRE, RXFNE and FE are also set in this case) It is cleared by software, in order to request a new auto baud rate detection, by writing 1 to the ABRRQ in the USART_RQR register. Note: If the USART does not support the auto baud rate feature, this bit is reserved and kept at reset value. 15 1 read-only BUSY Busy flag This bit is set and reset by hardware. It is active when a communication is ongoing on the RX line (successful start bit detected). It is reset at the end of the reception (successful or not). 16 1 read-only BUSY Idle USART is idle (no reception) 0 Busy Reception on going 1 CMF Character match flag This bit is set by hardware, when a the character defined by ADD[7:0] is received. It is cleared by software, writing 1 to the CMCF in the USART_ICR register. An interrupt is generated if CMIE=1in the USART_CR1 register. 17 1 read-only CMF NoMatch No Character match detected 0 Match Character match detected 1 SBKF Send break flag This bit indicates that a send break character was requested. It is set by software, by writing 1 to the SBKRQ bit in the USART_CR3 register. It is automatically reset by hardware during the stop bit of break transmission. 18 1 read-only SBKF NoBreak No break character transmitted 0 Break Break character transmitted 1 RWU Receiver wakeup from Mute mode This bit indicates if the USART is in Mute mode. It is cleared/set by hardware when a wakeup/mute sequence is recognized. The Mute mode control sequence (address or IDLE) is selected by the WAKE bit in the USART_CR1 register. When wakeup on IDLE mode is selected, this bit can only be set by software, writing 1 to the MMRQ bit in the USART_RQR register. Note: If the USART does not support the wakeup from Stop feature, this bit is reserved and kept at reset value. Refer to Section53.4: USART implementation on page2587. 19 1 read-only RWU Active Receiver in Active mode 0 Mute Receiver in Mute mode 1 WUF Wakeup from low-power mode flag This bit is set by hardware, when a wakeup event is detected. The event is defined by the WUS bitfield. It is cleared by software, writing a 1 to the WUCF in the USART_ICR register. An interrupt is generated if WUFIE=1 in the USART_CR3 register. Note: When UESM is cleared, WUF flag is also cleared. Note: If the USART does not support the wakeup from Stop feature, this bit is reserved and kept at reset value. Refer to Section53.4: USART implementation on page2587. 20 1 read-only TEACK Transmit enable acknowledge flag This bit is set/reset by hardware, when the Transmit Enable value is taken into account by the USART. It can be used when an idle frame request is generated by writing TE=0, followed by TE=1 in the USART_CR1 register, in order to respect the TE=0 minimum period. 21 1 read-only REACK Receive enable acknowledge flag This bit is set/reset by hardware, when the Receive Enable value is taken into account by the USART. It can be used to verify that the USART is ready for reception before entering low-power mode. Note: If the USART does not support the wakeup from Stop feature, this bit is reserved and kept at reset value. Refer to Section53.4: USART implementation on page2587. 22 1 read-only TXFE TXFIFO empty This bit is set by hardware when TXFIFO is empty. When the TXFIFO contains at least one data, this flag is cleared. The TXFE flag can also be set by writing 1 to the bit TXFRQ (bit 4) in the USART_RQR register. An interrupt is generated if the TXFEIE bit =1 (bit 30) in the USART_CR1 register. 23 1 read-only TXFE NotEmpty TXFIFO not empty. 0 Empty TXFIFO empty. 1 RXFF RXFIFO full This bit is set by hardware when the number of received data corresponds to RXFIFOsize+1 (RXFIFO full + 1 data in the USART_RDR register. An interrupt is generated if the RXFFIE bit =1 in the USART_CR1 register. 24 1 read-only RXFF NotFull RXFIFO not full. 0 Full RXFIFO Full. 1 TCBGT Transmission complete before guard time flag This bit is set when the last data written in the USART_TDR has been transmitted correctly out of the shift register. It is set by hardware in Smartcard mode, if the transmission of a frame containing data is complete and if the smartcard did not send back any NACK. An interrupt is generated if TCBGTIE=1 in the USART_CR3 register. This bit is cleared by software, by writing 1 to the TCBGTCF in the USART_ICR register or by a write to the USART_TDR register. Note: If the USART does not support the Smartcard mode, this bit is reserved and kept at reset value. If the USART supports the Smartcard mode and the Smartcard mode is enabled, the TCBGT reset value is '1'. Refer to Section 53.4: USART implementation on page 2587. 25 1 read-only TCBGT NotCompleted Transmission is not complete or transmission is complete unsuccessfully (i.e. a NACK is received from the card) 0 Completed Transmission is complete successfully (before Guard time completion and there is no NACK from the smart card) 1 RXFT RXFIFO threshold flag This bit is set by hardware when the threshold programmed in RXFTCFG in USART_CR3 register is reached. This means that there are (RXFTCFG - 1) data in the Receive FIFO and one data in the USART_RDR register. An interrupt is generated if the RXFTIE bit =1 (bit 27) in the USART_CR3 register. Note: When the RXFTCFG threshold is configured to '101', RXFT flag is set if 16 data are available i.e. 15 data in the RXFIFO and 1 data in the USART_RDR. Consequently, the 17th received data does not cause an overrun error. The overrun error occurs after receiving the 18th data. 26 1 read-only RXFT NotReached Receive FIFO does not reach the programmed threshold. 0 Reached Receive FIFO reached the programmed threshold. 1 TXFT TXFIFO threshold flag This bit is set by hardware when the TXFIFO reaches the threshold programmed in TXFTCFG of USART_CR3 register i.e. the TXFIFO contains TXFTCFG empty locations. An interrupt is generated if the TXFTIE bit =1 (bit 31) in the USART_CR3 register. 27 1 read-only TXFT NotReached TXFIFO does not reach the programmed threshold. 0 Reached TXFIFO reached the programmed threshold. 1 ICR ICR USART interrupt flag clear register 0x20 0x20 write-only 0x00000000 0xFFFFFFFF PECF Parity error clear flag Writing 1 to this bit clears the PE flag in the USART_ISR register. 0 1 write-only oneToClear PECF Clear Clears the PE flag in the ISR register 1 FECF Framing error clear flag Writing 1 to this bit clears the FE flag in the USART_ISR register. 1 1 write-only oneToClear FECF Clear Clears the FE flag in the ISR register 1 NECF Noise detected clear flag Writing 1 to this bit clears the NE flag in the USART_ISR register. 2 1 write-only oneToClear NECF Clear Clears the NF flag in the ISR register 1 ORECF Overrun error clear flag Writing 1 to this bit clears the ORE flag in the USART_ISR register. 3 1 write-only oneToClear ORECF Clear Clears the ORE flag in the ISR register 1 IDLECF Idle line detected clear flag Writing 1 to this bit clears the IDLE flag in the USART_ISR register. 4 1 write-only oneToClear IDLECF Clear Clears the IDLE flag in the ISR register 1 TXFECF TXFIFO empty clear flag Writing 1 to this bit clears the TXFE flag in the USART_ISR register. 5 1 write-only oneToClear TXFECF Clear Clear the TXFE flag in the ISR register 1 TCCF Transmission complete clear flag Writing 1 to this bit clears the TC flag in the USART_ISR register. 6 1 write-only oneToClear TCCF Clear Clears the TC flag in the ISR register 1 TCBGTCF Transmission complete before Guard time clear flag Writing 1 to this bit clears the TCBGT flag in the USART_ISR register. 7 1 write-only oneToClear TCBGTCF Clear Clear the TCBGT flag in the ISR register 1 LBDCF LIN break detection clear flag Writing 1 to this bit clears the LBDF flag in the USART_ISR register. Note: If LIN mode is not supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 8 1 write-only oneToClear LBDCF Clear Clears the LBDF flag in the ISR register 1 CTSCF CTS clear flag Writing 1 to this bit clears the CTSIF flag in the USART_ISR register. Note: If the hardware flow control feature is not supported, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 9 1 write-only oneToClear CTSCF Clear Clears the CTSIF flag in the ISR register 1 RTOCF Receiver timeout clear flag Writing 1 to this bit clears the RTOF flag in the USART_ISR register. Note: If the USART does not support the Receiver timeout feature, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 11 1 write-only oneToClear RTOCF Clear Clears the RTOF flag in the ISR register 1 EOBCF End of block clear flag Writing 1 to this bit clears the EOBF flag in the USART_ISR register. Note: If the USART does not support Smartcard mode, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 12 1 write-only oneToClear EOBCF Clear Clears the EOBF flag in the ISR register 1 UDRCF SPI slave underrun clear flag Writing 1 to this bit clears the UDRF flag in the USART_ISR register. Note: If the USART does not support SPI slave mode, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587 13 1 write-only oneToClear UDRCF Clear Clear the UDR flag in the ISR register 1 CMCF Character match clear flag Writing 1 to this bit clears the CMF flag in the USART_ISR register. 17 1 write-only oneToClear CMCF Clear Clears the CMF flag in the ISR register 1 WUCF Wakeup from low-power mode clear flag Writing 1 to this bit clears the WUF flag in the USART_ISR register. Note: If the USART does not support the wakeup from Stop feature, this bit is reserved and must be kept at reset value. Refer to Section53.4: USART implementation on page2587. 20 1 write-only oneToClear WUCF Clear Clears the WUF flag in the ISR register 1 RDR RDR USART receive data register 0x24 0x20 read-only 0x00000000 0xFFFFFFFF RDR Receive data value Contains the received data character. The RDR register provides the parallel interface between the input shift register and the internal bus (see Figure583). When receiving with the parity enabled, the value read in the MSB bit is the received parity bit. 0 9 read-only 0 511 TDR TDR USART transmit data register 0x28 0x20 read-write 0x00000000 0xFFFFFFFF TDR Transmit data value Contains the data character to be transmitted. The USART_TDR register provides the parallel interface between the internal bus and the output shift register (see Figure583). When transmitting with the parity enabled (PCE bit set to 1 in the USART_CR1 register), the value written in the MSB (bit 7 or bit 8 depending on the data length) has no effect because it is replaced by the parity. Note: This register must be written only when TXE/TXFNF=1. 0 9 read-write 0 511 PRESC PRESC USART prescaler register 0x2C 0x20 read-write 0x00000000 0xFFFFFFFF PRESCALER Clock prescaler The USART input clock can be divided by a prescaler factor: Remaining combinations: Reserved Note: When PRESCALER is programmed with a value different of the allowed ones, programmed prescaler value is 1011 i.e. input clock divided by 256. 0 4 read-write PRESCALER Div1 Input clock divided by 1 0 Div2 Input clock divided by 2 1 Div4 Input clock divided by 4 2 Div6 Input clock divided by 6 3 Div8 Input clock divided by 8 4 Div10 Input clock divided by 10 5 Div12 Input clock divided by 12 6 Div16 Input clock divided by 16 7 Div32 Input clock divided by 32 8 Div64 Input clock divided by 64 9 Div128 Input clock divided by 128 10 Div256 Input clock divided by 256 11 BLUE BLUE 0x60000000 0x0 0x1000 registers BLE_TX_RX_IRQn BLE Tx/Rx interrupt 18 INTERRUPT1REG INTERRUPT1REG INTERRUPT1REG register 0x4 0x20 read-write 0x00000000 ADDPOINTERROR Address Pointer Error. 4 1 read-write RXOVERFLOWERROR Receive Overflow error. 5 1 read-write SEQDONE Sequencer end of task. 7 1 read-write TXERROR_0 Transmission error 0: transmit block missing data error. 8 1 read-write TXERROR_1 Transmission error 1: a TX skip happened during an on-going transmission. 9 1 read-write TXERROR_2 Transmission error 2: channel index is greater than 39. 10 1 read-write TXERROR_3 Transmission error 3: error while waiting for the confirmation the Radio FSM is in TX state. 11 1 read-write TXERROR_4 Transmission error 4: a CTE issue occurred. 12 1 read-write ENCERROR Encryption error on reception. 13 1 read-write ALLTABLEREADYERROR All RAM Table not ready on time. 14 1 read-write TXDATAREADYERROR Transmit data pack not ready error 15 1 read-write NOACTIVELERROR GlobalStatMach. 16 1 read-write RCVLENGTHERROR Receive length error. 18 1 read-write SEMATIMEOUTERROR Semaphore timeout error 19 1 read-write TXRXSKIP Transmission/Reception skip. 21 1 read-write ACTIVE2ERROR Active2 Radio state error. 22 1 read-write CONFIGERROR Data pointer configuration error. 23 1 read-write TXOK Previous transmitted packet received OK by the peer device. 24 1 read-write DONE Receive/Transmit done. 25 1 read-write RCVTIMEOUT Receive timeout (no preamble found). 26 1 read-write RCVNOMD Received low MD bit. 27 1 read-write RCVCMD Received command 28 1 read-write TIMECAPTURETRIG A time has been captured in TIMERCAPTUREREG. 29 1 read-write RCVCRCERR Receive data fail 30 1 read-write RCVOK Receive data OK. 31 1 read-write INTERRUPT2REG INTERRUPT2REG INTERRUPT2REG register 0x8 0x20 read-write 0x00000000 AESMANENCINT AES manual encryption. 0 1 read-write AESLEPRIVINT AES LE privacy engine. 1 1 read-write TIMEOUTDESTREG TIMEOUTDESTREG TIMEOUTDESTREG register 0xC 0x20 read-write 0x00000000 DESTINATION Timeout timer Destination 0 2 read-write TIMEOUTREG TIMEOUTREG TIMEOUTREG register 0x10 0x20 read-write 0x00000000 TIMEOUT Timer1 or Timer2 Timeout value (depending on Destination register) 0 32 read-write TIMERCAPTUREREG TIMERCAPTUREREG TIMERCAPTUREREG register 0x14 0x20 read-only 0x00000000 TIMERCAPTURE Interpolated absolute time capture register 0 32 read-only CMDREG CMDREG CMDREG register 0x18 0x20 write-only 0x00000000 TXRXSKIP Transmission/Reception skip command. 0 1 write-only CLEARSEMAREQ Semaphore Clear command. 3 1 write-only STATUSREG STATUSREG STATUSREG register 0x1C 0x20 read-only 0x00000000 AESONFLYBUSY AES on the fligh encryption busy status 0 1 read-only NOTSUPPORTED_FUNCTION indicates the SW requests an unsupported feature. 3 1 read-only ADDPOINTERROR Address Pointer Error status 4 1 read-only RXOVERFLOWERROR AHB arbiter is full and there is no more storage capability available in RX datapath 5 1 read-only PREVTRANSMIT Previous event was a Transmission (1) or Reception (0) status 6 1 read-only SEQDONE Sequencer end of task status. 7 1 read-only TXERROR_0 Transmission error 0 status: Transmit block missing data error. 8 1 read-only TXERROR_1 Transmission error 1 status 9 1 read-only TXERROR_2 Transmission error 2 status. 10 1 read-only TXERROR_3 Transmission error 3: error while waiting for the confirmation the Radio FSM is in TX state (timeout defined in GlobalStatMach. 11 1 read-only TXERROR_4 Transmission error 4 status 12 1 read-only ENCERROR Encryption error on receive status 13 1 read-only ALLTABLEREADYERROR All RAM Table not ready status 14 1 read-only TXDATAREADYERROR Transmit data pack not ready status. 15 1 read-only NOACTIVELERROR GlobalStatMach. 16 1 read-only RCVLENGTHERROR Receive length error status 18 1 read-only SEMATIMEOUTERROR Semaphore timeout error status 19 1 read-only TXRXSKIP Transmission/Reception skip status. 21 1 read-only ACTIVE2ERROR Indicates the Radio FSM was not in ACTIVE2 state when the Sequencer reaches the end of 1st INIT step. 22 1 read-only CONFIGERROR Data pointer configuration error status 23 1 read-only TXOK Previous transmitted packet received OK by the peer device status. 24 1 read-only DONE Receive/Transmit done status. 25 1 read-only RCVTIMEOUT Receive timeout status (no access address found) 26 1 read-only RCVNOMD Received MD bit status (valid only on Data Physical Channel PDU reception) 27 1 read-only RCVCMD Received command status (valid only on Data Physical Channel PDU reception). 28 1 read-only TIMECAPTURETRIG indicates a time has been captured in TIMERCAPTUREREG when set. 29 1 read-only RCVCRCERR Receive data fail (CRC error or invalid CI field) status. 30 1 read-only RCVOK Receive data OK status 31 1 read-only INTERRUPT1ENABLEREG INTERRUPT1ENABLEREG INTERRUPT1ENABLEREG register 0x20 0x20 read-only 0x00000000 ADDPOINTERROR Address Pointer Error enable interruption 4 1 read-only RXOVERFLOWERROR Rx Overflow Error enable interruption 5 1 read-only SEQDONE Sequencer end of task enable interruption 7 1 read-only TXERROR_0 Transmission error 0 enable interruption 8 1 read-only TXERROR_1 Transmission error 1 enable interruption 9 1 read-only TXERROR_2 Transmission error 2 enable interruption 10 1 read-only TXERROR_3 Transmission error 3 enable interruption 11 1 read-only TXERROR_4 Transmission error 4 enable interruption 12 1 read-only ENCERROR Encryption error on receive enable interruption 13 1 read-only ALLTABLEREADYERROR All RAM Table not ready enable interruption 14 1 read-only TXDATAREADYERROR Transmit data pack not ready enable interruption 15 1 read-only NOACTIVELERROR active bit error enable interruption 16 1 read-only RCVLENGTHERROR Receive length error enable interruption 18 1 read-only SEMATIMEOUTERROR Semaphore timeout error enable interruption 19 1 read-only TXRXSKIP Transmission/Reception skip enable interruption 21 1 read-only ACTIVE2ERROR Active2 Radio state error enable interruption 22 1 read-only CONFIGERROR Data pointer configuration error enable interruption 23 1 read-only TXOK Previous transmitted packet received OK enable interruption 24 1 read-only DONE Receive/Transmit done interruption 25 1 read-only RCVTIMEOUT Receive timeout enable interruption (no preamble found) 26 1 read-only RCVNOMD Received MD bit embedded in the PDU data packet header was zero enable interruption 27 1 read-only RCVCMD Received command enable interruption 28 1 read-only TIMECAPTURETRIG TimerCaptureReg time capture enable interruption 29 1 read-only RCVCRCERR Receive data fail enable interruption 30 1 read-only RCVOK Receive data OK enable interruption 31 1 read-only INTERRUPT1LATENCYREG INTERRUPT1LATENCYREG INTERRUPT1LATENCYREG register 0x24 0x20 read-only 0x00000000 INTERRUPT1LATENCY relative time counter started on irq_BLE_int1 (BLE_TXRX) occurrence. 0 8 read-only MANAESKEY0REG MANAESKEY0REG MANAESKEY0REG register 0x28 0x20 read-write 0x00000000 MANAESKEY_31_0 Manual mode AES key 0 32 read-write MANAESKEY1REG MANAESKEY1REG MANAESKEY1REG register 0x2C 0x20 read-write 0x00000000 MANAESKEY_63_32 Manual mode AES key 0 32 read-write MANAESKEY2REG MANAESKEY2REG MANAESKEY2REG register 0x30 0x20 read-write 0x00000000 MANAESKEY_95_64 Manual mode AES key 0 32 read-write MANAESKEY3REG MANAESKEY3REG MANAESKEY3REG register 0x34 0x20 read-write 0x00000000 MANAESKEY_127_96 Manual mode AES key 0 32 read-write MANAESCLEARTEXT0REG MANAESCLEARTEXT0REG MANAESCLEARTEXT0REG register 0x38 0x20 read-write 0x00000000 AES Manual Aes Clear Text 0 32 read-write MANAESCLEARTEXT1REG MANAESCLEARTEXT1REG MANAESCLEARTEXT1REG register 0x3C 0x20 read-write 0x00000000 AES Manual Aes Clear Text 0 32 read-write MANAESCLEARTEXT2REG MANAESCLEARTEXT2REG MANAESCLEARTEXT2REG register 0x40 0x20 read-write 0x00000000 AES Manual Aes Clear Text 0 32 read-write MANAESCLEARTEXT3REG MANAESCLEARTEXT3REG MANAESCLEARTEXT3REG register 0x44 0x20 read-write 0x00000000 AES Manual Aes Clear Text 0 32 read-write MANAESCIPHERTEXT0REG MANAESCIPHERTEXT0REG MANAESCIPHERTEXT0REG register 0x48 0x20 read-only 0x00000000 AES Manual AES Cipher Text 0 32 read-only MANAESCIPHERTEXT1REG MANAESCIPHERTEXT1REG MANAESCIPHERTEXT1REG register 0x4C 0x20 read-only 0x00000000 AES Manual AES Cipher Text 0 32 read-only MANAESCIPHERTEXT2REG MANAESCIPHERTEXT2REG MANAESCIPHERTEXT2REG register 0x50 0x20 read-only 0x00000000 AES Manual AES Cipher Text 0 32 read-only MANAESCIPHERTEXT3REG MANAESCIPHERTEXT3REG MANAESCIPHERTEXT3REG register 0x54 0x20 read-only 0x00000000 AES Manual AES Cipher Text 0 32 read-only MANAESCMDREG MANAESCMDREG MANAESCMDREG register 0x58 0x20 read-write 0x00000000 START AES Manual encryption Start command. 0 1 write-only INTENA AES Manual encryption interrupt enable on Interrupt2Reg 1 1 read-write MANAESSTATREG MANAESSTATREG MANAESSTATREG register 0x5C 0x20 read-only 0x00000000 BUSY AES manual encryption busy status 0 1 read-only AESLEPRIVPOINTERREG AESLEPRIVPOINTERREG AESLEPRIVPOINTERREG register 0x60 0x20 read-write 0x00000000 POINTER AES Le privacy pointer 0 24 read-write AESLEPRIVHASHREG AESLEPRIVHASHREG AESLEPRIVHASHREG register 0x64 0x20 read-write 0x00000000 HASH AES Le privacy Reference Hash 0 24 read-write AESLEPRIVPRANDREG AESLEPRIVPRANDREG AESLEPRIVPRANDREG register 0x68 0x20 read-write 0x00000000 PRAND AES Le privacy Prand 0 24 read-write AESLEPRIVCMDREG AESLEPRIVCMDREG AESLEPRIVCMDREG register 0x6C 0x20 read-write 0x00000000 START AES Le privacy Start command. 0 1 write-only INTENA AES Le privacy interrupt enable on Interrupt2Reg 1 1 read-write NBKEYS AES Le privacy number of keys pointed by AesLePrivPointerReg (points to the resolution key list. 2 8 read-write AESLEPRIVSTATREG AESLEPRIVSTATREG AESLEPRIVSTATREG register 0x70 0x20 read-only 0x00000000 BUSY AES Le privacy busy status 0 1 read-only KEYFND AES Le privacy key finding status 1 1 read-only KEYFNDINDEX AES Le privacy index of the key found in the resolution key list. 2 8 read-only DEBUGCMDREG DEBUGCMDREG DebugCmd register 0x74 0x20 read-write 0x00000000 CLEARDEBUGINT CLEARDEBUGINT 0 1 SEQDEBUGMODE SEQDEBUGMODE 1 1 SEQDEBUGBUSSEL SEQDEBUGBUSSEL 2 4 AESDEBUGMODE AESDEBUGMODE 16 4 DEBUGSTATUSREG DEBUGSTATUSREG DebugStatus register 0x78 0x20 read-only 0x00000000 DEBUGSTATUSREG DEBUGSTATUSREG 0 7 AESDBG_0 AESDBG_0 16 1 AESDBG_1 AESDBG_1 17 1 AESDBG_2 AESDBG_2 18 1 AESDBG_3 AESDBG_3 19 1 GLOBALSTATMACH GLOBALSTATMACH 0x200000C0 0x0 0x1C registers WORD0 WORD0 WORD0 register 0x0 0x20 read-write 0x00000000 RadioConfigPtr Radio Configuration address Pointer. 0 32 read-write WORD1 WORD1 WORD1 register 0x4 0x20 read-write 0x00000000 CurStMachNum current connection machine number. 0 7 read-write Active Must be at '1' when the trig event (Wakeup Timer, Timer1 or Timer2) occurs to starts a Bluetooth LE link layer sequence. 7 1 read-write WakeupInitDelay Delay between wakeup timer trig event on Sequencer and RX/TX request sending to the Radio FSM. 8 8 read-write Timer12InitDelayCal Delay between Timer1 or Timer2 trig event on Sequencer and RX/TX request sending to the Radio FSM. 16 8 read-write Timer2InitDelayNoCal Delay between Timer2 trig event on Sequencer and RX/TX request sending to the Radio FSM. 24 8 read-write WORD2 WORD2 WORD2 register 0x8 0x20 read-write 0x00000000 TransmitCalDelayChk Delay between TX request sent to the Radio FSM and the start pulse sent to the transmit block. 0 8 read-write TransmitNoCalDelayChk Delay between TX request sent to the Radio FSM and the start pulse to the transmit block. 8 8 read-write ReceiveCalDelayChk Delay between RX request sent to the Radio FSM and the start pulse sent to the receive block. 16 8 read-write ReceiveNoCalDelayChk Delay between RX request sent to the Radio FSM and the start pulse to the receive block. 24 8 read-write WORD3 WORD3 WORD3 register 0xC 0x20 read-write 0x00000000 ConfigEndDuration Duration for the Sequencer to execute the final configuration. 0 8 read-write TxdataReadyCheck Duration for the Sequencer to get the TxDataReady and DataPtr information in TxRxPack table. 8 8 read-write TxdelayStart Delay added between the moment the Radio FSM is in TX mode (PA ramp up done and power present on the antenna) and the first bit transmission to the modulator. 16 8 read-write TxdelayEnd Delay added between the last bit transmission to the modulator and the end of transmission information for the Sequencer. 24 6 read-write TimeCaptureSel - 0: the captured time (absolute time) corresponds to the end of 1st INIT step in the sequence (InitDelay timeout event). 30 1 read-write TimeCapture - 0: No capture is requested to monitor the Bluetooth LE sequence. 31 1 read-write WORD4 WORD4 WORD4 register 0x10 0x20 read-write 0x00000000 TxReadyTimeout Transmission ready timeout. 0 8 read-write RcvTimeout Receive window timeout. 8 20 read-write WORD5 WORD5 WORD5 register 0x14 0x20 read-write 0x00000000 AutoTxRxskipEn Automatic transfer (TX or RX) skip enable. 0 1 read-write ChkFlagAutoClearEna Active bit Auto Clear Enable. 2 1 read-write IntAddPointError Address pointer error interrupt enable. 20 1 read-write IntAllTableReadyError All table ready error interrupt enable. 21 1 read-write IntTxDataReadyError Transmission data payload ready error interrupt enable. 22 1 read-write IntNoActiveLError Active bit low value reading interrupt enable. 23 1 read-write IntRcvLengthError Too long received payload length interrupt enable. 25 1 read-write IntSemaTimeoutError Semaphore timeout error interrupt enable. 26 1 read-write IntSeqDone Sequencer end of task interrupt enable. 28 1 read-write intTxRxSkip Transmission or reception skip interrupt enable. 29 1 read-write IntActive2Err not in ACTIVE2 information from Radio FSM received on time interrupt enable. 30 1 read-write IntConfigError Configuration error interrupt enable. 31 1 read-write WORD6 WORD6 WORD6 register 0x18 0x20 read-write 0x00000000 DefaultAntennaID Default Antenna ID corresponding to the number of the antenna used to receive/transmit: 0 7 RADIO_CONTROL RADIO_CONTROL 0x60001000 0x0 0x400 registers ID ID RADIO_CONTROL_ID register 0x0 0x20 read-only 0x00003000 REVISION Incremented for metal fix version 4 4 read-only VERSION Cut Number 8 4 read-only PRODUCT incremented on major features add-on like new Bluetooth LE SIG version support 12 4 read-only CLK32COUNT_REG CLK32COUNT_REG CLK32COUNT_REG register 0x4 0x20 read-write 0x00000017 SLOW_COUNT program the window length (in slow clock period) for slow clock measurement. 0 9 read-write CLK32PERIOD_REG CLK32PERIOD_REG CLK32PERIOD_REG register 0x8 0x20 read-only 0x00000000 SLOW_PERIOD indicates slow clock period information. 0 19 read-only CLK32FREQUENCY_REG CLK32FREQUENCY_REG CLK32FREQUENCY_REG register 0xC 0x20 read-only 0x00000000 SLOW_FREQUENCY value equal to (2^39/ SLOW_PERIOD). 0 27 read-only IRQ_STATUS IRQ_STATUS RADIO_CONTROL_IRQ_STATUS register 0x10 0x20 read-write 0x00000000 SLOW_CLK_IRQ slow clock measurement end of calculation interrupt status 0 1 read-write RADIO_FSM_IRQ Radio FSM interrupt status (aka RfFsm_event_irq). 8 6 read-write IRQ_ENABLE IRQ_ENABLE RADIO_CONTROL_IRQ_ENABLE register 0x14 0x20 read-write 0x00000000 SLOW_CLK_IRQ_MASK mask slow clock measurement interrupt 0 1 read-write RADIO_FSM_IRQ_MASK mask for each RfFsm_event (Radio FSM) interrupt. 8 6 read-write RADIO RADIO 0x60001500 0x0 0x300 registers RADIO_ERROR RADIO Error interrupt 20 RADIO_CPU_WKUP RADIO CPU Wakeup interrupt 23 RADIO_TXRX_WKUP RADIO Wakeup interrupt 24 RADIO_TXRX_SEQ RADIO RX/TX sequence interrupt 25 AA0_DIG_USR AA0_DIG_USR AA0_DIG_USR register 0x0 0x20 read-write 0x000000D6 AA_7_0 Least significant byte of the Bluetooth LE Access Address code 0 8 read-write AA1_DIG_USR AA1_DIG_USR AA1_DIG_USR register 0x4 0x20 read-write 0x000000BE AA_15_8 Next byte of the Bluetooth LE Access Address code. 0 8 read-write AA2_DIG_USR AA2_DIG_USR AA2_DIG_USR register 0x8 0x20 read-write 0x00000089 AA_23_16 Next byte of the Bluetooth LE Access Address code 0 8 read-write AA3_DIG_USR AA3_DIG_USR AA3_DIG_USR register 0xC 0x20 read-write 0x0000008E AA_31_24 Most significant byte of the Bluetooth LE Access Address code. 0 8 read-write DEM_MOD_DIG_USR DEM_MOD_DIG_USR DEM_MOD_DIG_USR register 0x10 0x20 read-write 0x00000026 CHANNEL_NUM Index for internal lock up table in which the synthesizer setup is contained. 1 7 read-write FSM_USR FSM_USR RADIO_FSM_USR register 0x14 0x20 read-write 0x00000004 EN_CALIB_CBP CBP calibration enable bit. 1 1 read-write EN_CALIB_SYNTH SYNTH calibration enable bit. 2 1 read-write PA_POWER PA Power coefficient. 3 5 read-write PHYCTRL_DIG_USR PHYCTRL_DIG_USR PHYCTRL_DIG_USR register 0x18 0x20 read-write 0x00000000 RXTXPHY RXTXPHY selection. 0 3 read-write AFC1_DIG_ENG AFC1_DIG_ENG AFC1_DIG_ENG register 0x48 0x20 read-write 0x00000044 AFC_DELAY_AFTER Set the decay factor of the AFC loop after Access Address detection 0 4 read-write AFC_DELAY_BEFORE Set the decay factor of the AFC loop before Access Address detection 4 4 read-write CR0_DIG_ENG CR0_DIG_ENG CR0_DIG_ENG register 0x54 0x20 read-write 0x00000044 CR_GAIN_AFTER Set the gain of the clock recovery loop before Access Address detection to the value 0 4 read-write CR_GAIN_BEFORE Set the gain of the clock recovery loop before Access Address detection to the value 4 4 read-write CR0_LR CR0_LR CR0_LR register 0x68 0x20 read-write 0x00000066 CR_LR_GAIN_AFTER Set the gain of the clock recovery loop after Access Address detection to the value 2^(-CR_LR_GAIN_ AFTER) when the coded PHY is in use 0 4 read-write CR_LR_GAIN_BEFORE Set the gain of the clock recovery loop before Access Address detection to the value 2^(-CR_LR_GAIN_ BEFORE) when the coded PHY is in use 4 4 read-write VIT_CONF_DIG_ENG VIT_CONF_DIG_ENG VIT_CONF_DIG_ENG register 0x6C 0x20 read-write 0x00000000 VIT_EN Viterbi enable 0 1 read-write SPARE spare 2 6 read-write LR_PD_THR_DIG_ENG LR_PD_THR_DIG_ENG LR_PD_THR_DIG_ENG register 0x84 0x20 read-write 0x00000050 LR_PD_THR preamble detect threshold value 0 8 read-write LR_RSSI_THR_DIG_ENG LR_RSSI_THR_DIG_ENG LR_RSSI_THR_DIG_ENG register 0x88 0x20 read-write 0x0000001B LR_RSSI_THR RSSI or peak threshold value 0 8 read-write LR_AAC_THR_DIG_ENG LR_AAC_THR_DIG_ENG LR_AAC_THR_DIG_ENG register 0x8C 0x20 read-write 0x00000038 LR_AAC_THR address coded correlation threshold 0 8 read-write SYNTHCAL0_DIG_ENG SYNTHCAL0_DIG_ENG SYNTHCAL0_DIG_ENG register 0xA8 0x20 read-write 0x00000000 SYNTHCAL_DEBUG_BUS_SEL for Debug purpose 0 4 read-write SYNTH_IF_FREQ_CAL Define the frequency applied on the PLL during calibration phase 6 2 read-write DTB5_DIG_ENG DTB5_DIG_ENG DTB5_DIG_ENG register 0xF0 0x20 read-write 0x00000000 RXTX_START_SEL enable the possibility to control some signals by the other register bits instead of system design: 0 1 read-write TX_ACTIVE Force TX_ACTIVE signal 1 1 read-write RX_ACTIVE Force RX_ACTIVE signal 2 1 read-write INITIALIZE Force INITIALIZE signal (emulate a token request of the IP_BLE) 3 1 read-write PORT_SELECTED_EN enable port selection 4 1 read-write PORT_SELECTED_0 force port_selected[0] signal 5 1 read-write RXADC_ANA_USR RXADC_ANA_USR RXADC_ANA_USR register 0x148 0x20 read-write 0x0000001B RFD_RXADC_DELAYTRIM_I ADC loop delay control bits for I channel to apply when SW overload is enabled 0 3 read-write RFD_RXADC_DELAYTRIM_Q ADC loop delay control bits for Q channel to apply when SW overload is enabled 3 3 read-write RXADC_DELAYTRIM_I_TST_SEL Enable the SW overload on RXADX delay trimming 6 1 read-write RXADC_DELAYTRIM_Q_TST_SEL Enable the SW overload on RXADX delay trimming 7 1 read-write LDO_ANA_ENG LDO_ANA_ENG LDO_ANA_ENG register 0x154 0x20 read-write 0x00000000 RFD_RF_REG_BYPASS RF_REG Bypass mode: 0 1 read-write CBIAS0_ANA_ENG CBIAS0_ANA_ENG CBIAS0_ANA_ENG register 0x174 0x20 read-write 0x00000088 RFD_CBIAS_IBIAS_TRIM overloaded value for cbias current trimming (when CBIAS0_TRIM_TST_SEL = 1) 0 4 read-write RFD_CBIAS_IPTAT_TRIM overloaded value for cbias current trimming (when CBIAS0_TRIM_TST_SEL = 1) 4 4 read-write CBIAS1_ANA_ENG CBIAS1_ANA_ENG CBIAS1_ANA_ENG register 0x178 0x20 read-write 0x00000000 CBIAS0_TRIM_TST_SEL When set, RFD_CBIAS_(IPTAT/IBIAS)_TRIM are used instead of HW trimmings 7 1 read-write SYNTHCAL0_DIG_OUT SYNTHCAL0_DIG_OUT SYNTHCAL0_DIG_OUT register 0x180 0x20 read-only 0x00000000 VCO_CALAMP_OUT_6_0 VCO CALAMP value 0 7 read-only SYNTHCAL1_DIG_OUT SYNTHCAL1_DIG_OUT SYNTHCAL1_DIG_OUT register 0x184 0x20 read-only 0x00000001 VCO_CALAMP_OUT_10_7 VCO CALAMP value 0 4 read-only SYNTHCAL2_DIG_OUT SYNTHCAL2_DIG_OUT SYNTHCAL2_DIG_OUT register 0x188 0x20 read-only 0x00000040 VCO_CALFREQ_OUT VCO CALFREQ value 0 7 read-only SYNTHCAL3_DIG_OUT SYNTHCAL3_DIG_OUT SYNTHCAL3_DIG_OUT register 0x18C 0x20 read-only 0x00000000 SYNTHCAL_DEBUG_BUS Calibration debug bus. 0 8 read-only SYNTHCAL4_DIG_OUT SYNTHCAL4_DIG_OUT SYNTHCAL4_DIG_OUT register 0x190 0x20 read-only 0x00000018 MOD_REF_DAC_WORD_OUT Calibration word 0 6 read-only SYNTHCAL5_DIG_OUT SYNTHCAL5_DIG_OUT SYNTHCAL5_DIG_OUT register 0x194 0x20 read-only 0x00000007 CBP_CALIB_WORD CBP Calibration word 0 4 read-only FSM_STATUS_DIG_OUT FSM_STATUS_DIG_OUT FSM_STATUS_DIG_OUT register 0x198 0x20 read-only 0x00000000 STATUS RF FSM state: 0 5 read-only SYNTH_CAL_ERROR PLL calibration error 7 1 read-only RSSI0_DIG_OUT RSSI0_DIG_OUT RSSI0_DIG_OUT register 0x1A4 0x20 read-only 0x00000008 RSSI_MEAS_OUT_7_0 Measure of the received signal strength. 0 8 read-only RSSI1_DIG_OUT RSSI1_DIG_OUT RSSI1_DIG_OUT register 0x1A8 0x20 read-only 0x00000008 RSSI_MEAS_OUT_15_8 Measure of the received signal strength 0 8 read-only AGC_DIG_OUT AGC_DIG_OUT AGC_DIG_OUT register 0x1AC 0x20 read-only 0x00000000 AGC_ATT_OUT AGC attenuation value 0 4 read-only DEMOD_DIG_OUT DEMOD_DIG_OUT DEMOD_DIG_OUT register 0x1B0 0x20 read-only 0x00000000 CI_FIELD CI field 0 2 read-only AAC_FOUND aac_found 2 1 read-only PD_FOUND pd_found 3 1 read-only RX_END rx_end 4 1 read-only AGC2_ANA_TST AGC2_ANA_TST AGC2_ANA_TST register 0x1BC 0x20 read-write 0x00000000 AGC2_ANA_TST_SEL Selection: 0 1 read-write AGC_ANTENNAE_USR_TRIM the AGC antenna trimming value ( when AGC2_ANA_TST_SEL = 1) 1 3 read-write AGC0_DIG_ENG AGC0_DIG_ENG AGC0_DIG_ENG register 0x1C0 0x20 read-write 0x0000004A AGC_THR_HIGH High AGC threshold 0 6 read-write AGC_ENABLE Enable AGC 6 1 read-write AGC1_DIG_ENG AGC1_DIG_ENG AGC1_DIG_ENG register 0x1C4 0x20 read-write 0x00000084 AGC_THR_LOW_6 Low threshold for 6dB steps 0 6 read-write AGC_AUTOLOCK AGC locks when level is steady between high threshold and lock threshold 6 1 read-write AGC_LOCK_SYNC AGC locks when Access Address is detected (recommended) 7 1 read-write AGC10_DIG_ENG AGC10_DIG_ENG AGC10_DIG_ENG register 0x1E8 0x20 read-write 0x00000000 ATT_IF_0 Attenuation at IF Level for the AGC step 0: 0 3 read-write ATT_LNA_0 Attenuation at LNA Level for the AGC step 0: 3 1 read-write ATT_ANT_0 Attenuation at Antenna Level for the AGC step 0: 4 2 read-write AGC11_DIG_ENG AGC11_DIG_ENG AGC11_DIG_ENG register 0x1EC 0x20 read-write 0x00000010 ATT_IF_1 Attenuation at IF Level for the AGC step 1 0 3 read-write ATT_LNA_1 Attenuation at LNA Level for the AGC step 1 3 1 read-write ATT_ANT_1 Attenuation at Antenna Level for the AGC step 1 4 2 read-write AGC12_DIG_ENG AGC12_DIG_ENG AGC12_DIG_ENG register 0x1F0 0x20 read-write 0x00000020 ATT_IF_2 Attenuation at IF Level for the AGC step 2 0 3 read-write ATT_LNA_2 Attenuation at LNA Level for the AGC step 2 3 1 read-write ATT_ANT_2 Attenuation at Antenna Level for the AGC step 2 4 2 read-write AGC13_DIG_ENG AGC13_DIG_ENG AGC13_DIG_ENG register 0x1F4 0x20 read-write 0x00000030 ATT_IF_3 Attenuation at IF Level for the AGC step 3 0 3 read-write ATT_LNA_3 Attenuation at LNA Level for the AGC step 3 3 1 read-write ATT_ANT_3 Attenuation at Antenna Level for the AGC step 3 4 2 read-write AGC14_DIG_ENG AGC14_DIG_ENG AGC14_DIG_ENG register 0x1F8 0x20 read-write 0x00000038 ATT_IF_4 Attenuation at IF Level for the AGC step 4 0 3 read-write ATT_LNA_4 Attenuation at LNA Level for the AGC step 4 3 1 read-write ATT_ANT_4 Attenuation at Antenna Level for the AGC step 4 4 2 read-write AGC15_DIG_ENG AGC15_DIG_ENG AGC15_DIG_ENG register 0x1FC 0x20 read-write 0x00000039 ATT_IF_5 Attenuation at IF Level for the AGC step 5 0 3 read-write ATT_LNA_5 Attenuation at LNA Level for the AGC step 5 3 1 read-write ATT_ANT_5 Attenuation at Antenna Level for the AGC step 5 4 2 read-write AGC16_DIG_ENG AGC16_DIG_ENG AGC16_DIG_ENG register 0x200 0x20 read-write 0x0000003A ATT_IF_6 Attenuation at IF Level for the AGC step 6 0 3 read-write ATT_LNA_6 Attenuation at LNA Level for the AGC step 6 3 1 read-write ATT_ANT_6 Attenuation at Antenna Level for the AGC step 6 4 2 read-write AGC17_DIG_ENG AGC17_DIG_ENG AGC17_DIG_ENG register 0x204 0x20 read-write 0x0000003B ATT_IF_7 Attenuation at IF Level for the AGC step 7 0 3 read-write ATT_LNA_7 Attenuation at LNA Level for the AGC step 7 3 1 read-write ATT_ANT_7 Attenuation at Antenna Level for the AGC step 7 4 2 read-write AGC18_DIG_ENG AGC18_DIG_ENG AGC18_DIG_ENG register 0x208 0x20 read-write 0x0000003C ATT_IF_8 Attenuation at IF Level for the AGC step 8 0 3 read-write ATT_LNA_8 Attenuation at LNA Level for the AGC step 8 3 1 read-write ATT_ANT_8 Attenuation at Antenna Level for the AGC step 8 4 2 read-write AGC19_DIG_ENG AGC19_DIG_ENG AGC19_DIG_ENG register 0x20C 0x20 read-write 0x0000003D ATT_IF_9 Attenuation at IF Level for the AGC step 9 0 3 read-write ATT_LNA_9 Attenuation at LNA Level for the AGC step 9 3 1 read-write ATT_ANT_9 Attenuation at Antenna Level for the AGC step 9 4 2 read-write RXADC_HW_TRIM_OUT RXADC_HW_TRIM_OUT RXADC_HW_TRIM_OUT register 0x224 0x20 read-only 0x0000001B HW_RXADC_DELAYTRIM_I control bits of the RX ADC loop delay for I channel (provided by the HW trimming, automatically loaded on POR). 0 3 read-only HW_RXADC_DELAYTRIM_Q control bits of the RX ADC loop delay for Q channel (provided by the HW trimming, automatically loaded on POR). 3 3 read-only CBIAS0_HW_TRIM_OUT CBIAS0_HW_TRIM_OUT CBIAS0_HW_TRIM_OUT register 0x228 0x20 read-only 0x00000088 HW_CBIAS_IBIAS_TRIM CBIAS current (provided by the HW trimming, automatically loaded on POR). 0 4 read-only HW_CBIAS_IPTAT_TRIM CBIAS current (provided by the HW trimming, automatically loaded on POR). 4 4 read-only AGC_HW_TRIM_OUT AGC_HW_TRIM_OUT AGC_HW_TRIM_OUT register 0x230 0x20 read-only 0x00000006 HW_AGC_ANTENNAE_TRIM AGC trim value (provided by the HW trimming, automatically loaded on POR). 1 3 read-only DEMOD_IQ2_DIG_TST DEMOD_IQ2_DIG_TST DEMOD_IQ2_DIG_TST register 0x23C 0x20 read-write 0x00000000 EXTCFG_SAMPLING_TIME Defines the sampling time, when extended configuration is enabled: 0 2 read-write EXTCFG_TRIG_SELECTION Defines the trigger/anchor point of the IQ sampling, when extended configuration is enabled: 2 2 read-write ANTSW0_DIG_USR ANTSW0_DIG_USR ANTSW0_DIG_USR register 0x240 0x20 read-write 0x0000001C RX_TIME_TO_SAMPLE specifies the exact timing of the first I/Q sampling in the reference period. 0 7 read-write ANTSW1_DIG_USR ANTSW1_DIG_USR ANTSW1_DIG_USR register 0x244 0x20 read-write 0x0000000B RX_TIME_TO_SWITCH specifies the exact timing of the antenna switching at receiver level (in AoA). 0 6 read-write ANTSW2_DIG_USR ANTSW2_DIG_USR ANTSW2_DIG_USR register 0x248 0x20 read-write 0x00000029 TX_TIME_TO_SWITCH specifies the exact timing of the antenna switching during transmission at LE_1M baud rate (in AoD). 0 7 read-write ANTSW3_DIG_USR ANTSW3_DIG_USR ANTSW3_DIG_USR register 0x24C 0x20 read-write 0x00000023 TX_TIME_TO_SWITCH_2M specifies the exact timing of the antenna switching during transmission at LE_2M baud rate (in AoD). 0 7 read-write RRM RRM 0x60001400 0x0 0x100 registers UDRA_CTRL0 UDRA_CTRL0 UDRA_CTRL0 register 0x10 0x20 read-write 0x00000000 RELOAD_RDCFGPTR reload the radio configuration pointer from RAM. 0 1 read-write UDRA_IRQ_ENABLE UDRA_IRQ_ENABLE UDRA_IRQ_ENABLE register 0x14 0x20 read-write 0x00000000 RADIO_CFG_PTR_RELOADED UDRA interrupt enable (reload radio config pointer) 0 1 read-write CMD_START UDRA interrupt enable (command start) 1 1 read-write CMD_END UDRA interrupt enable (command end) 2 1 read-write UDRA_IRQ_STATUS UDRA_IRQ_STATUS UDRA_IRQ_STATUS register 0x18 0x20 read-write 0x00000000 RADIO_CFG_PTR_RELOADED On read, returns the UDRA reload radio configuration pointer interrupt status. 0 1 read-write CMD_STARD On read, returns the UDRA command start interrupt status. 1 1 read-write CMD_END On read, returns the UDRA command end interrupt status 2 1 read-write UDRA_RADIO_CFG_PTR UDRA_RADIO_CFG_PTR UDRA_RADIO_CFG_PTR register 0x1C 0x20 read-only 0x00000000 RADIO_CONFIG_ADDRESS UDRA radio configuration address. 0 32 read-only SEMA_IRQ_ENABLE SEMA_IRQ_ENABLE SEMA_IRQ_ENABLE register 0x20 0x20 read-write 0x00000000 LOCK semaphore locked (= one port granted) interrupt enable 0 1 read-write UNLOCK semaphore unlocked (=no port selected) interrupt enable 1 1 read-write SEMA_IRQ_STATUS SEMA_IRQ_STATUS SEMA_IRQ_STATUS register 0x24 0x20 read-write 0x00000000 LOCK On read, returns the semaphore locked interrupt status. 0 1 read-write UNLOCK On read, returns the semaphore unlocked interrupt status. 1 1 read-write BLE_IRQ_ENABLE BLE_IRQ_ENABLE BLE_IRQ_ENABLE register 0x28 0x20 read-write 0x00000000 PORT_GRANT IP_BLE Port grant interrupt enable 0 1 read-write PORT_RELEASE IP_BLE Port release interrupt enable 1 1 read-write PORT_CMD_START IP_BLE Port command start interrup enable 3 1 read-write PORT_CMD_END IP_BLE Port command end interrup enable 4 1 read-write BLE_IRQ_STATUS BLE_IRQ_STATUS BLE_IRQ_STATUS register 0x2C 0x20 read-write 0x00000000 PORT_GRANT IP_BLE hardware port granted interrupt status: 0 1 read-write PORT_RELEASE IP_BLE hardware port released interrupt status. 1 1 read-write CMD_START IP_BLE hardware port command start interrupt status. 3 1 read-write CMD_END IP_BLE hardware port command end interrupt status. 4 1 read-write VP_CPU_CMD_BUS VP_CPU_CMD_BUS VP_CPU_CMD_BUS register 0x60 0x20 read-write 0x00000000 COMMAND command number 0 3 read-write COMMAND_REQ CPU Virtual port command request: 3 1 read-write VP_CPU_SEMA_BUS VP_CPU_SEMA_BUS VP_CPU_SEMA_BUS register 0x64 0x20 read-write 0x00000000 TAKE_PRIO semaphore priority: priority value (between 0 and 7) of the take request. 0 3 read-write TAKE_REQ semaphore token request: 3 1 read-write VP_CPU_IRQ_ENABLE VP_CPU_IRQ_ENABLE VP_CPU_IRQ_ENABLE register 0x68 0x20 read-write 0x00000000 PORT_GRANT CPU virtual port grant interrupt enable 0 1 read-write PORT_RELEASE CPU virtual port release interrupt enable 1 1 read-write PORT_CMD_START CPU virtual port command start interrup enable 3 1 read-write PORT_CMD_END CPU virtual port command end interrup enable 4 1 read-write VP_CPU_IRQ_STATUS VP_CPU_IRQ_STATUS VP_CPU_IRQ_STATUS register 0x6C 0x20 read-write 0x00000000 PORT_GRANT CPU virtual port granted interrupt status. 0 1 read-write PORT_RELEASE virtual port released interrupt status. 1 1 read-write PORT_PREEMPT CPU virtual port preemption (at semaphore level) interrupt status. 2 1 read-write CMD_START CPU virtual port command start interrupt status. 3 1 read-write CMD_END CPU virtual port command end interrupt status. 4 1 read-write WAKEUP WAKEUP 0x60001800 0x0 0x400 registers OFFSET OFFSET WAKEUP_OFFSET register 0x8 0x20 read-write 0x00000000 WAKEUP_OFFSET delay of anticipation of the Soc device to settle power and clock 0 8 read-write ABSOLUTE_TIME ABSOLUTE_TIME ABSOLUTE_TIME register 0x10 0x20 read-only 0x00000000 ABSOLUTE_TIME absolute time 0 32 read-only MINIMUM_PERIOD_LENGTH MINIMUM_PERIOD_LENGTH MINIMUM_PERIOD_LENGTH register 0x14 0x20 read-only 0x00000000 LENGTH minimum period length computed by Time Interpolator 4 10 read-only AVERAGE_PERIOD_LENGTH AVERAGE_PERIOD_LENGTH AVERAGE_PERIOD_LENGTH register 0x18 0x20 read-only 0x00000000 LENGTH_FRACT additional information/precision on slow clock frequency. 0 4 read-only LENGTH_INT average period length computed by Time Interpolator. 4 10 read-only AVERAGE_COUNT Number of slow clock cycles. 24 8 read-only MAXIMUM_PERIOD_LENGTH MAXIMUM_PERIOD_LENGTH MAXIMUM_PERIOD_LENGTH register 0x1C 0x20 read-only 0x00000000 LENGTH maximum period length computed by Time Interpolator 4 10 read-only STATISTICS_RESTART STATISTICS_RESTART STATISTICS_RESTART register 0x20 0x20 read-write 0x00000000 CLR_MIN_MAX Write '1' to clear the minimum and maximum registers. 0 1 read-write CLR_AVR Write '1' to clear the AVERAGE_PERIOD_LENGTH register value. 1 1 read-write BLUE_WAKEUP_TIME BLUE_WAKEUP_TIME BLUE_WAKEUP_TIME register 0x24 0x20 read-write 0x00000000 WAKEUP_TIME programmed wakeup time for the IP_BLE. 0 32 read-write BLUE_SLEEP_REQUEST_MODE BLUE_SLEEP_REQUEST_MODE BLUE_SLEEP_REQUEST_MODE register 0x28 0x20 read-write 0x00000007 SLEEP_EN IP_BLE sleeping mode enable: 29 1 read-write BLE_WAKEUP_EN IP_BLE wakeup enable: 30 1 read-write FORCE_SLEEPING IP_BLE sleeping control: 31 1 read-write CM0_WAKEUP_TIME CM0_WAKEUP_TIME CM0_WAKEUP_TIME register 0x2C 0x20 read-write 0x00000000 WAKEUP_TIME programmed wakeup time for CPU. 4 28 read-write CM0_SLEEP_REQUEST_MODE CM0_SLEEP_REQUEST_MODE CM0_SLEEP_REQUEST_MODE register 0x30 0x20 read-write 0x80000007 CPU_WAKEUP_EN CPU wakeup enable: 30 1 read-write FORCE_SLEEPING CPU sleeping control: 31 1 read-write BLE_IRQ_ENABLE BLE_IRQ_ENABLE WAKEUP_BLE_IRQ_ENABLE register 0x40 0x20 read-write 0x00000000 WAKEUP_IT IP_BLE wakeup interrupt enable: 0 1 read-write BLE_IRQ_STATUS BLE_IRQ_STATUS WAKEUP_BLE_IRQ_STATUS register 0x44 0x20 read-write 0x00000000 WAKEUP_IT On read, returns the IP_BLE wakeup interrupt status. 0 1 read-write CM0_IRQ_ENABLE CM0_IRQ_ENABLE WAKEUP_CM0_IRQ_ENABLE register 0x48 0x20 read-write 0x00000000 WAKEUP_IT CPU wakeup interrupt enable: 0 1 read-write CM0_IRQ_STATUS CM0_IRQ_STATUS WAKEUP_CM0_IRQ_STATUS register 0x4C 0x20 read-write 0x00000000 WAKEUP_IT On read, returns the CPU wakeup interrupt status. 0 1 read-write FLASH_CTRL 4kb addressable space FLASH_CTRL 0x40001000 0x0 0x2000 registers FLASH Non-volatile memory (flash) controller 0 COMMAND COMMAND COMMAND register 0x0 0x20 read-write 0x00000000 COMMAND Macro commands for flash operations (may require DATA0...DATA3 to be set): - 0x11 : ERASE - 0x22 : MASSERASE - 0x33 : WRITE - 0x55 : MASSREAD - 0xAA : SLEEP - 0xBB : WAKEUP - 0xCC : BURSTWRITE - 0xEE : OTPWRITE - 0xFF : KEYWRITE 0 8 read-write CONFIG CONFIG CONFIG register 0x4 0x20 read-write 0x00000010 REMAP Bit to redirect boot area on SRAM0. 1 1 read-write DIS_GROUP_WRITE Burst write Control: - 0 : burst write allowed - 1 : burst write forbidden 2 1 read-write WAIT_STATES Number of wait states to be inserted on Flash read (AHB accesses) 4 2 read-write IRQSTAT IRQSTAT IRQSTAT register 0x8 0x20 read-write 0x00000000 CMDDONE_MIS Command done masked interrupt status. 0 1 read-write CMDSTART_MIS Command started masked interrupt status. 1 1 read-write CMDERR_MIS Command error masked interrupt status. 2 1 read-write ILLCMD_MIS Illegal command masked interrupt status 3 1 read-write READOK_MIS Mass read OK masked interrupt status. 4 1 read-write IRQMASK IRQMASK IRQMASK register 0xC 0x20 read-write 0x0000003F CMDDONEM Command done mask 0 1 read-write CMDSTARTM Command started mask. 1 1 read-write CMDERRM Command error mask. 2 1 read-write ILLCMDM Illegal command mask. 3 1 read-write READOKM Mass read OK mask. 4 1 read-write IRQRAW IRQRAW IRQRAW register 0x10 0x20 read-write 0x00000001 CMDDONE_RIS Command done raw/unmasked interrupt status. This it is set once the requested command execution is completed. Cleared by writing 1. 0 1 read-write CMDSTART_RIS Command started raw/unmasked interrupt status. This bit is set once the requested command execution has started. 1 1 read-write CMDERR_RIS Command error raw/unmasked interrupt status 2 1 read-write ILLCMD_RIS Illegal command raw/unmasked interrupt status. 3 1 read-write READOK_RIS Mass read OK raw/unmasked interrupt status 4 1 read-write SIZE SIZE SIZE register 0x14 0x20 read-only 0x0000FFFF FLASH_SIZE Maximum valid address for flash memory: - 00 : 0x0BFFF (192kb) - 01 : 0x0FFFF (256kb) - 10 : 0x17FFF (384kb) - 11 : 0x1FFFF (512kb) 0 16 read-only RAM_SIZE RAM memory size selection: - 00 : 32kb - 01 : 32kb - 10 : 48kb - 11 : 64kb 17 2 read-only FLASH_SECURE Flash memory protection (0: no key present, 1: key present) 19 1 read-only SWD_DISABLE Flash+SWD protection: 0: No SWD protection (refer to FLASH_SECURE) 1: Flash and SWD protected 20 1 read-only ADDRESS ADDRESS ADDRESS register 0x18 0x20 read-write 0x00000000 YADDR Flash column address offset to be used with some COMMAND 0 6 read-write XADDR Flash row address offset to be used with some COMMAND 6 10 read-write LFSRVAL LFSRVAL LFSRVAL register 0x24 0x20 read-only 0xFFFFFFFF LFSRVAL Flash read data CRC signature 0 32 read-only PAGEPROT0 PAGEPROT0 PAGEPROT0 register 0x34 0x20 read-write 0x00000000 SEG0 First segment definition. 0 16 read-write SEG1 Second segment definition. See SEG0 description for details on SEG1[31:16] content 16 16 read-write PAGEPROT1 PAGEPROT1 PAGEPROT1 register 0x38 0x20 read-write 0x00000000 SEG2 Third segment definition. See PAGEPROT0 SEG0 description for details on SEG2[15:0] content 0 16 read-write SEG3 Fourth segment definition. See PAGEPROT0 SEG0 description for details on SEG3[15:0] content. 16 16 read-write DATA0 DATA0 DATA0 register 0x40 0x20 read-write 0xFFFFFFFF DATA0 Value to be used as DATA for any COMMAND of type WRITE and compare value for MASSREAD 0 32 read-write DATA1 DATA1 DATA1 register 0x44 0x20 read-write 0xFFFFFFFF DATA1 Value to be used as DATA for any COMMAND of type WRITE 0 32 read-write DATA2 DATA2 DATA2 register 0x48 0x20 read-write 0xFFFFFFFF DATA2 Value to be used as DATA for any COMMAND of type WRITE 0 32 read-write DATA3 DATA3 DATA3 register 0x4C 0x20 read-write 0xFFFFFFFF DATA3 Value to be used as DATA for any COMMAND of type WRITE 0 32 read-write RNG RNG 0x48600000 0x0 0x1000 registers CR CR RNG_CR register 0x0 0x20 read-write 0x0000FF00 RNG_DIS This bit enables or disables the random number generator. 0: RNG is enabled (default) 1: RNG is disabled. The internal free-running oscillators are put in power-down mode and the RNG clock is stopped at the input of the block. 1 1 read-write TST_CLK Reset reveal clock error flags when writing a '1' without resetting the whole TRNG. When writing a 1, the value remains until it is seen by RNG core clock domain after resynchronization. Then it is automatically reset. 3 1 read-write SR SR RNG_SR register 0x4 0x20 read-only 0x00000000 RNGRDY New random value ready 0 1 read-only REVCLK RNGCLK clock reveal bit. 1 1 read-only FAULT Fault reveal bit. 2 1 read-only VAL VAL RNG_VAL register 0x8 0x20 read-only 0x00000000 RND_VAL Random value 0 16 read-only PWRC PWRC 0x48500000 0x0 0xA0 registers CR1 CR1 CR1 register 0x0 0x20 read-write 0x00000114 LPMS LPMS Low Power Mode Selection Selection of the low power mode entered when CPU enters DEEP SLEEP mode and BLE is rdy2sleep. 0 1 read-write ENSDNBOR Enable BOR reset supervising during SHUTDOWN mode. 1 1 read-write APC APC Apply Pull-up and pull-down configuration from CPU 4 1 read-write CR2 CR2 CR2 register 0x4 0x20 read-write 0x00000000 PVDE PVDE Programmable Voltage Detector Enable When this bit is set the Power Voltage Detector is enabled 0 1 read-write PVDLS PVDLS[2:0] Programmable Voltage Detector Level selection then PVDO=1) 1 3 read-write RAMRET1 RAMRET1: RAM1 retention during low power mode 5 1 read-write RAMRET2 Enables the RAM2 bank retention in DEEPSTOP mode. 6 1 read-write RAMRET3 Enables the RAM3 bank retention in DEEPSTOP mode. 7 1 read-write ENTS Enable the temperature sensor. 9 1 read-write LSILPMUFEN LSI LPMU force enable. 10 1 read-write CR3 CR3 CR3 register 0x8 0x20 read-write 0x00000000 EWU0 EWU0 Enable WakeUp line 0 (PB0) When this bit is set the wakeup line 0 is enabled and a rising or falling edge on wakeup line 0 will trigger a CPU wakeup event depending on CR4.WP0 bit. 0 1 read-write EWU1 EWU1 Enable WakeUp line 1 (PB1) When this bit is set the wakeup line 1 is enabled and a rising or falling edge on wakeup line 1 will trigger a CPU wakeup event depending on CR4.WP1 bit. 1 1 read-write EWU2 EWU2 Enable WakeUp line 2 (PB2) When this bit is set the wakeup line 2 is enabled and a rising or falling edge on wakeup line 2 will trigger a CPU wakeup event depending on CR4.WP2 bit. 2 1 read-write EWU3 EWU3 Enable WakeUp line 3 (PB3) When this bit is set the wakeup line 3 is enabled and a rising or falling edge on wakeup line 3 will trigger a CPU wakeup event depending on CR4.WP3 bit. 3 1 read-write EWU4 EWU4 Enable WakeUp line 4 (PB4) When this bit is set the wakeup line 4 is enabled and a rising or falling edge on wakeup line 4 will trigger a CPU wakeup event depending on CR4.WP4 bit. 4 1 read-write EWU5 EWU5 Enable WakeUp line 5 (PB5) When this bit is set the wakeup line 5 is enabled and a rising or falling edge on wakeup line 5 will trigger a CPU wakeup event depending on CR4.WP5 bit. 5 1 read-write EWU6 EWU6 Enable WakeUp line 6 (PB6) When this bit is set the wakeup line 6 is enabled and a rising or falling edge on wakeup line 6 will trigger a CPU wakeup event depending on CR4.WP6 bit. 6 1 read-write EWU7 EWU7 Enable WakeUp line 7 (PB7) When this bit is set the wakeup line 7 is enabled and a rising or falling edge on wakeup line 7 will trigger a CPU wakeup event depending on CR4.WP7 bit. 7 1 read-write EWU8 EWU8 Enable WakeUp line 8 (PA8) When this bit is set the wakeup line 8 is enabled and a rising or falling edge on wakeup line 8 will trigger a CPU wakeup event depending on CR4.WP8 bit. 8 1 read-write EWU9 EWU9 Enable WakeUp line 9 (PA9) When this bit is set the wakeup line 9 is enabled and a rising or falling edge on wakeup line 9 will trigger a CPU wakeup event depending on CR4.WP9 bit. 9 1 read-write EWU10 EWU10 Enable WakeUp line 10 (PA10) When this bit is set the wakeup line 10 is enabled and a rising or falling edge on wakeup line 10 will trigger a CPU wakeup event depending on CR4.WP10 bit. 10 1 read-write EWU11 EWU11 Enable WakeUp line 11 (PA11) When this bit is set the wakeup line 11 is enabled and a rising or falling edge on wakeup line 11 will trigger a CPU wakeup event depending on CR4.WP11 bit. 11 1 read-write EWBLE EWBLE: Enable wakeup on BLE event. 0: Wakeup on BLE line is disabled (default). 1: Wakeup on BLE line is enabled. 12 1 read-write EWBLEHCPU EWBLEHCPU: Enable wakeup on BLE Host CPU event. 0: Wakeup on BLE Host CPU line is disabled (default). 1: Wakeup on BLE Host CPU line is enabled. 13 1 read-write EIWL EIWL: Enable wakeup on Internal event (RTC). 0: Wakeup on internal line is disabled (default). 1: Wakeup on internal line is enabled. 15 1 read-write CR4 CR4 CR4 register 0xC 0x20 read-write 0x00000000 WUP0 WUP0 Wake-up Line Polarity 0 (PB0) This bit defines the polarity used for event detection on external wake-up line 0 0 1 read-write WUP1 WUP1 Wake-up Line Polarity 1 (PB1) This bit defines the polarity used for event detection on external wake-up line 1 1 1 read-write WUP2 WUP2 Wake-up Line Polarity 2 (PB2) This bit defines the polarity used for event detection on external wake-up line 2 2 1 read-write WUP3 WUP3 Wake-up Line Polarity 3 (PB3) This bit defines the polarity used for event detection on external wake-up line 3 3 1 read-write WUP4 WUP4 Wake-up Line Polarity 4 (PB4) This bit defines the polarity used for event detection on external wake-up line 4 4 1 read-write WUP5 WUP5 Wake-up Line Polarity 5 (PB5) This bit defines the polarity used for event detection on external wake-up line 5 5 1 read-write WUP6 WUP6 Wake-up Line Polarity 6 (PB6) This bit defines the polarity used for event detection on external wake-up line 6 6 1 read-write WUP7 WUP7 Wake-up Line Polarity 7 (PB7) This bit defines the polarity used for event detection on external wake-up line 7 7 1 read-write WUP8 WUP8 Wake-up Line Polarity 8 (PA8) This bit defines the polarity used for event detection on external wake-up line 8 8 1 read-write WUP9 WUP9 Wake-up Line Polarity 9 (PA9) This bit defines the polarity used for event detection on external wake-up line 9 9 1 read-write WUP10 WUP10 Wake-up Line Polarity 10 (PA10) This bit defines the polarity used for event detection on external wake-up line 10 10 1 read-write WUP11 WUP11 Wake-up Line Polarity 11 (PA11) This bit defines the polarity used for event detection on external wake-up line 11 11 1 read-write SR1 SR1 SR1 register 0x10 0x20 read-write 0x00000000 WUF0 WUF0 WakeUp Flag 0 (PB0) This bit is set when a wakeup is detected on wakeup line 0. It is cleared by a reset pad or by writing 1 in this bit field. writting this bit, clears the interrupt: 0 1 read-write WUF1 WUF1 WakeUp Flag 1 (PB1) This bit is set when a wakeup is detected on wakeup line 1. It is cleared by a reset pad or by writing 1 in this bit field. writting this bit, clears the interrupt: 1 1 read-write WUF2 WUF2 WakeUp Flag 2 (PB2) This bit is set when a wakeup is detected on wakeup line 2. It is cleared by a reset pad or by writing 1 in this bit field. writting this bit, clears the interrupt: 2 1 read-write WUF3 WUF3 WakeUp Flag 3 (PB3) This bit is set when a wakeup is detected on wakeup line 3. It is cleared by a reset pad or by writing 1 in this bit field. writting this bit, clears the interrupt: 3 1 read-write WUF4 WUF4 WakeUp Flag 4 (PB4) This bit is set when a wakeup is detected on wakeup line 4. It is cleared by a reset pad or by writing 1 in this bit field. writting this bit, clears the interrupt: 4 1 read-write WUF5 WUF5 WakeUp Flag 5 (PB5) This bit is set when a wakeup is detected on wakeup line 5. It is cleared by a reset pad or by writing 1 in this bit field. writting this bit, clears the interrupt: 5 1 read-write WUF6 WUF6 WakeUp Flag 6 (PB6) This bit is set when a wakeup is detected on wakeup line 6. It is cleared by a reset pad or by writing 1 in this bit field. writting this bit, clears the interrupt: 6 1 read-write WUF7 WUF7 WakeUp Flag 7 (PB7) This bit is set when a wakeup is detected on wakeup line 7. It is cleared by a reset pad or by writing 1 in this bit field. writting this bit, clears the interrupt: 7 1 read-write WUF8 WUF8 WakeUp Flag 8 (PA8) This bit is set when a wakeup is detected on wakeup line 8. It is cleared by a reset pad or by writing 1 in this bit field. writting this bit, clears the interrupt: 8 1 read-write WUF9 WUF9 WakeUp Flag 9 (PA9) This bit is set when a wakeup is detected on wakeup line 9. It is cleared by a reset pad or by writing 1 in this bit field. writting this bit, clears the interrupt: 9 1 read-write WUF10 WUF10 WakeUp Flag 10 (PA10) This bit is set when a wakeup is detected on wakeup line 10. It is cleared by a reset pad or by writing 1 in this bit field. writting this bit, clears the interrupt: 10 1 read-write WUF11 WUF11 WakeUp Flag 11 (PA11) This bit is set when a wakeup is detected on wakeup line 11. It is cleared by a reset pad or by writing 1 in this bit field. writting this bit, clears the interrupt: 11 1 read-write WBLEF WBLEF: BLE wakeup flag. 0: no wakeup from BLE occurred since last clear. 1: a wakeup from BLE occurred since last clear. Cleared by writing 1 in this bit. 12 1 read-write WBLEHCPUF WBLEHCPUF: BLE Host CPU wakeup flag. 0: no wakeup from BLE Host CPU occurred since last clear. 1: a wakeup from BLE Host CPU occurred since last clear. Cleared by writing 1 in this bit. 13 1 read-write IWUF IWUF: Internal wakeup flag (RTC). 0: no wakeup from RTC occurred since last clear. 1: a wakeup from RTC occurred since last clear. Note: The user must clear the RTC wakeup flag inside the RTC IP to clear this bit (mirror of the RTC wakeup line on the PWRC block). 15 1 read-only SR2 SR2 SR2 register 0x14 0x20 read-only 0x00000306 SMPSBYPR SMPSBYPR: SMPS Force Bypass Control Replica This bit mirrors the actual BYPASS_3V3 control signal driven to the SMPS regulator, dependant on the real working state. 0 1 read-only SMPSENR SMPSENR: SMPS Enable Control Replica This bit mirrors the actual ENABLE_3V3 control signal driven to the SMPS regulator, dependant on the real working state. 1 1 read-only SMPSRDY SMPSRDY: SMPS Ready Status This bit provides the information whether SMPS is ready. 2 1 read-only REGLPS REGLPS: Regulator Low Power Started This bit provides the information whether low power regulator is ready. 8 1 read-only REGMS REGMS: Regulator Main LDO Started This bit provides the information whether main regulator is ready. 9 1 read-only PVDO PVDO: Power Voltage Detector Output When the Power Voltage Detector is enabled (CR2.PVDE) this bit is set when the system supply (VDDIO) is lower than the selected PVD threshold (CR2.PVDLS) 11 1 read-only IOBOOTVAL Bit3: PA11 input value on VDD33 latched at POR Bit2: PA10 input value on VDD33 latched at POR Bit1: PA9 input value on VDD33 latched at POR Bit0: PA8 input value on VDD33 latched at POR 12 4 read-only CR5 CR5 CR5 register 0x1C 0x20 read-write 0x00006014 SMPSLVL SMPSLVL[3:0] SMPS Output Level Voltage Selection Select the SMPS output voltage with a granularity of 50mV. Default = '0100' (1.4V) Vout = 1.2 + 0.05*SMPSOUT (V) 0 4 read-write SMPSBOMSEL SMPSBOMSEL: SMPS BOM Selection: 4 2 read-write SMPSLPOPEN SMPSLPOPEN: In Low Power mode SMPS is in OPEN mode (instead of PRECHARGE mode). When this bit is set, when the chip is in Low power mode the SMPS regulator will be disabled (HZ) Documentation needed. 8 1 read-write SMPSFBYP SMPSFB Force SMPS Regulator in bypass mode When this bit is set, the SMPS regulator will be forced to operate in precharge mode. the actual state of SMPS can be observed thanks to the replica SR2.SMPSBYPR. 9 1 read-write NOSMPS NOSMPS: No SMPS Mode When this bit is set, the SMPS regulator will be disabled. Note that this configuration should be used only when SMPS_FB pad is directly connected to VBATT or Vext, without L/C BOM. 10 1 read-write SMPS_ENA_DCM SMPS_ENA_DCM: enable discontinuous conduction mode 11 1 read-write CLKDETR_DISABLE CLKDETR_DISABLE: disable SMPS clock detection The SMPS clock detection enables an automatic SMPS bypass switching in case of unwanted loss of SMPS clock. 12 1 read-write PUCRA PUCRA PUCRA register 0x20 0x20 read-write 0x00000F07 PUA PUA[x] : Pull Up Pull up activation on port A[i] pad when APC bit of PWRC CR3 is set 0 16 read-write PDCRA PDCRA PDCRA register 0x24 0x20 read-write 0x00000008 PDA PDA[x]: Pull Down Pull Down activation on port A[i] pad when APC bit of PWRC CR3 is set 0 16 read-write PUCRB PUCRB PUCRB register 0x28 0x20 read-write 0x0000F0FF PUB PUB[x] : Pull Up Pull up activation on port B[i] pad when APC bit of PWRC CR3 is set 0 16 read-write PDCRB PDCRB PDCRB register 0x2C 0x20 read-write 0x00000000 PDB PDB[x]: Pull Down Pull Down activation on port B[i] pad when APC bit of PWRC CR3 is set 0 16 read-write CR6 CR6 CR6 register 0x30 0x20 read-write 0x00000000 EWU12 EWU12 Enable WakeUp line 12 (PA0) When this bit is set the wakeup line 12 is enabled and a rising or falling edge on wakeup line 0 will trigger a CPU wakeup event depending on CR7.WP0 bit. 0 1 read-write EWU13 EWU13 Enable WakeUp line 13 (PA1) When this bit is set the wakeup line 13 is enabled and a rising or falling edge on wakeup line 1 will trigger a CPU wakeup event depending on CR7.WP1 bit. 1 1 read-write EWU14 EWU14 Enable WakeUp line 14 (PA2) When this bit is set the wakeup line 14 is enabled and a rising or falling edge on wakeup line 2 will trigger a CPU wakeup event depending on CR7.WP2 bit. 2 1 read-write EWU15 EWU15 Enable WakeUp line 15 (PA3) When this bit is set the wakeup line 15 is enabled and a rising or falling edge on wakeup line 3 will trigger a CPU wakeup event depending on CR7.WP3 bit. 3 1 read-write EWU16 EWU16 Enable WakeUp line 16 (PB12) When this bit is set the wakeup line 16 is enabled and a rising or falling edge on wakeup line 4 will trigger a CPU wakeup event depending on CR7.WP4 bit. 4 1 read-write EWU17 EWU17 Enable WakeUp line 17 (PB13) When this bit is set the wakeup line 17 is enabled and a rising or falling edge on wakeup line 5 will trigger a CPU wakeup event depending on CR7.WP5 bit. 5 1 read-write EWU18 EWU18 Enable WakeUp line 18 (PB14) When this bit is set the wakeup line 18 is enabled and a rising or falling edge on wakeup line 6 will trigger a CPU wakeup event depending on CR7.WP6 bit. 6 1 read-write EWU19 EWU19 Enable WakeUp line 19 (PB15) When this bit is set the wakeup line 19 is enabled and a rising or falling edge on wakeup line 7 will trigger a CPU wakeup event depending on CR7.WP7 bit. 7 1 read-write EWU20 Enable wakeup on PB8 I/O event. 8 1 read-write EWU21 Enable wakeup on PB9 I/O event. 9 1 read-write EWU22 Enable wakeup on PB10 I/O event. 10 1 read-write EWU23 Enable wakeup on PB11 I/O event. 11 1 read-write EWU24 Enable wakeup on PA12 I/O event. 12 1 read-write EWU25 Enable wakeup on PA13 I/O event. 13 1 read-write EWU26 Enable wakeup on PA14 I/O event. 14 1 read-write EWU27 Enable wakeup on PA15 I/O event. 15 1 read-write CR7 CR7 CR7 register 0x34 0x20 read-write 0x00000000 WUP12 WUP12 Wake-up Line Polarity 12 (PA0) This bit defines the polarity used for event detection on external wake-up line 12 0 1 read-write WUP13 WUP13 Wake-up Line Polarity 13 (PA1) This bit defines the polarity used for event detection on external wake-up line 13 1 1 read-write WUP14 WUP14 Wake-up Line Polarity 14 (PA2) This bit defines the polarity used for event detection on external wake-up line 14 2 1 read-write WUP15 WUP15 Wake-up Line Polarity 15 (PA3) This bit defines the polarity used for event detection on external wake-up line 15 3 1 read-write WUP16 WUP16 Wake-up Line Polarity 16 (PB12) This bit defines the polarity used for event detection on external wake-up line 16 4 1 read-write WUP17 WUP17 Wake-up Line Polarity 17 (PB13) This bit defines the polarity used for event detection on external wake-up line 17 5 1 read-write WUP18 WUP18 Wake-up Line Polarity 18 (PB14) This bit defines the polarity used for event detection on external wake-up line 18 6 1 read-write WUP19 WUP19 Wake-up Line Polarity 19 (PB15) This bit defines the polarity used for event detection on external wake-up line 19 7 1 read-write WUP20 Wake-up polarity for PB8 IO event. 8 1 read-write WUP21 Wake-up polarity for PB9 IO event. 9 1 read-write WUP22 Wake-up polarity for PB10 IO event. 10 1 read-write WUP23 Wake-up polarity for PB11 IO event. 11 1 read-write WUP24 Wake-up polarity for PB12 IO event. 12 1 read-write WUP25 Wake-up polarity for PB13 IO event. 13 1 read-write WUP26 Wake-up polarity for PB14 IO event. 14 1 read-write WUP27 Wake-up polarity for PB15 IO event. 15 1 read-write SR3 SR3 SR3 register 0x38 0x20 read-write 0x00000000 WUF12 WUF12 WakeUp Flag 12 PA0 This bit is set when a wakeup is detected on wakeup line 12. It is cleared by a reset pad or by writing 1 in this bit field. writting this bit, clears the interrupt: 0 1 read-write WUF13 WUF13 WakeUp Flag 13 PA1 This bit is set when a wakeup is detected on wakeup line 13. It is cleared by a reset pad or by writing 1 in this bit field. writting this bit, clears the interrupt: 1 1 read-write WUF14 WUF14 WakeUp Flag 14 PA2 This bit is set when a wakeup is detected on wakeup line 14. It is cleared by a reset pad or by writing 1 in this bit field. writting this bit, clears the interrupt: 2 1 read-write WUF15 WUF15 WakeUp Flag 15 PA3 This bit is set when a wakeup is detected on wakeup line 15. It is cleared by a reset pad or by writing 1 in this bit field. writting this bit, clears the interrupt: 3 1 read-write WUF16 WUF16 WakeUp Flag 16 PB12 This bit is set when a wakeup is detected on wakeup line 16. It is cleared by a reset pad or by writing 1 in this bit field. writting this bit, clears the interrupt: 4 1 read-write WUF17 WUF17 WakeUp Flag 17 PB13 This bit is set when a wakeup is detected on wakeup line 17. It is cleared by a reset pad or by writing 1 in this bit field. writting this bit, clears the interrupt: 5 1 read-write WUF18 WUF18 WakeUp Flag 18 PB14 This bit is set when a wakeup is detected on wakeup line 18. It is cleared by a reset pad or by writing 1 in this bit field. writting this bit, clears the interrupt: 6 1 read-write WUF19 PA7 I/O wake-up flag. 7 1 read-write WUF20 PB8 I/O wake-up flag. 8 1 read-write WUF21 PB9 I/O wake-up flag. 9 1 read-write WUF22 PB10 I/O wake-up flag. 10 1 read-write WUF23 PB11 I/O wake-up flag. 11 1 read-write WUF24 PB12 I/O wake-up flag. 12 1 read-write WUF25 PB13 I/O wake-up flag. 13 1 read-write WUF26 PB14 I/O wake-up flag. 14 1 read-write WUF27 PB15 I/O wake-up flag. 15 1 read-write IOxCFG IOxCFG IOxCFG register 0x40 0x20 read-write 0x00000000 IOCFG0 Drive configuration for PA8. 0 2 read-write IOCFG1 Drive configuration for PA9. 2 2 read-write IOCFG2 Drive configuration for PA10. 4 2 read-write IOCFG3 Drive configuration for PA11. 6 2 read-write IOCFG4 Drive configuration for PA4. 8 2 read-write IOCFG5 Drive configuration for PA5. 10 2 read-write IOCFG6 Drive configuration for PA6. 12 2 read-write IOCFG7 Drive configuration for PA7. 14 2 read-write DBGR DBGR DBGR register 0x84 0x20 read-write 0x00000000 DEEPSTOP2 DEEPSTOP2: DEEPSTOP2 low power saving emulation enable. 0: normal DEEPSTOP will be applied 1: DEEPSTOP2 (debugger features not lost) will be applied instead of DEEPSTOP. 0 1 read-write EXTSRR EXTSRR EXTSRR register 0x88 0x20 read-write 0x00000000 DEEPSTOPF DEEPSTOPF System DeepStop Flag This bit is set by hardware and cleared only by a POR reset or by writing '1' in this bit field 9 1 read-write RFPHASEF RFPHASEF RFPHASE Flag This bit is set by hardware after a Radio wake-up event (BLE activation); it is cleared either by software, writing '1' in this bit field, or by hardware when Ready2Sleep signal is asserted by the Radio IP. 10 1 read-write PKA PKA 0x48300000 0x0 0x1400 registers PKA PKA interrupt 13 CSR CSR PKA_CSR register 0x0 0x20 read-write 0x00000000 GO PKA start processing command. Writing 0 has no effect Writing 1 starts the encryption engine 0 1 read-write READY PKA readiness status. 0: The PKA is still computing 1: The PKA is ready to start a new calculation 1 1 read-only SFT_RST PKA software reset. Writing 0 clears the bit and releases the PKA block reset. Writing 1 resets the PKA block. The PKA RAM content is not changed. 7 1 read-write ISR ISR PKA_ISR register 0x4 0x20 read-write 0x00000000 PROC_END PKA process ending interrupt. When read: 0: No new event detected 1: The PKA process is ended (This bit is set to 1 when the PKA_CSR.READY bit rises.) When written: To clear the pending interrupt, the user must write this bit to 1 and clear it just after by writing 0. If the write 0 does not occur, the interrupt is generated on next event towards the CPU if enabled in PKA_IER but the flag is seen at 0 when the interrupt handler reads it in this register (as clear action is still active). 0 1 read-write RAM_ERR RAM read / write access error interrupt. 2 1 read-write ADD_ERR AHB Address error interrupt. 3 1 read-write IEN IEN PKA_IEN register 0x8 0x20 read-write 0x00000000 READY_EN READY interrupt enable. 0 1 read-write RAMERR_EN RAM access error interrupt enable. 2 1 read-write ADDERR_EN AHB Address error interrupt enable. 3 1 read-write GPIOB GPIO 0x48100000 0x0 0x2C registers GPIOB GPIOB interrupt 16 MODER MODER MODER register 0x0 0x20 read-write 0x00000000 16 0x2 0-15 MODE%s Port x configuration pin %s 0 2 read-write OTYPER OTYPER OTYPER register 0x4 OSPEEDR OSPEEDR OSPEEDR register 0x8 0x20 read-write 0x00000000 16 0x2 0-15 OSPEED%s Port x configuration pin %s 0 2 read-write PUPDR PUPDR PUPDR register 0xC 0x20 read-write 0x55005555 16 0x2 0-15 PUPD%s Port x configuration pin %s 0 2 read-write IDR IDR IDR register 0x10 ODR ODR ODR register 0x14 BSRR BSRR BSRR register 0x18 LCKR LCKR LCKR register 0x1C AFRL AFRL AFRL register 0x20 AFRH AFRH AFRH register 0x24 BRR BRR BRR register 0x28 LPUART LPUART 0x41005000 0x0 0x30 registers LPUART LPUART interrupt 9 CR1 CR1 CR1 register 0x0 0x20 read-write 0x00000000 UE UE: USART enable When this bit is cleared, the USART prescalers and outputs are stopped immediately, and current operations are discarded. The configuration of the USART is kept, but all the status flags, in the USART_ISR are reset. This bit is set and cleared by software. -0: USART prescaler and outputs disabled, low power mode -1: USART enabled 0 1 read-write UE Disabled UART is disabled 0 Enabled UART is enabled 1 RE RE: Receiver enable This bit enables the receiver. It is set and cleared by software. -0: Receiver is disabled -1: Receiver is enabled and begins searching for a start bit 2 1 read-write RE Disabled Receiver is disabled 0 Enabled Receiver is enabled 1 TE TE: Transmitter enable This bit enables the transmitter. It is set and cleared by software. -0: Transmitter is disabled -1: Transmitter is enabled 3 1 read-write TE Disabled Transmitter is disabled 0 Enabled Transmitter is enabled 1 IDLEIE IDLEIE: IDLE interrupt enable This bit is set and cleared by software. -0: Interrupt is inhibited -1: A USART interrupt is generated whenever IDLE=1 in the USART_ISR register 4 1 read-write IDLEIE Disabled Interrupt is disabled 0 Enabled Interrupt is generated whenever IDLE=1 in the ISR register 1 RXNEIE RXNEIE/RXFNEIE: Receive data register not empty/RXFIFO not empty interrupt enable This bit is set and cleared by software. -0: Interrupt is inhibited -1: An USART interrupt is generated whenever ORE=1 or RXNE/RXFNE=1 in the USART_ISR register 5 1 read-write RXNEIE Disabled Interrupt is disabled 0 Enabled Interrupt is generated whenever ORE=1 or RXNE=1 in the ISR register 1 TCIE TCIE: Transmission complete interrupt enable This bit is set and cleared by software. -0: Interrupt is inhibited -1: A USART interrupt is generated whenever TC=1 in the USART_ISR register 6 1 read-write TCIE Disabled Interrupt is disabled 0 Enabled Interrupt is generated whenever TC=1 in the ISR register 1 TXEIE TXEIE/TXFNFIE: Transmit data regsiter empty/TXFIFO not full interrupt enable This bit is set and cleared by software. -0: Interrupt is inhibited -1: A USART interrupt is generated whenever TXE/TXFNF =1 in the USART_ISR register 7 1 read-write TXEIE Disabled Interrupt is disabled 0 Enabled Interrupt is generated whenever TXE=1 in the ISR register 1 PEIE PEIE: PE interrupt enable This bit is set and cleared by software. -0: Interrupt is inhibited -1: A USART interrupt is generated whenever PE=1 in the USART_ISR register 8 1 read-write PEIE Disabled Interrupt is disabled 0 Enabled Interrupt is generated whenever PE=1 in the ISR register 1 PS PS: Parity selection This bit selects the odd or even parity when the parity generation/detection is enabled (PCE bit set). It is set and cleared by software. The parity will be selected after the current byte. -0: Even parity -1: Odd parity This bit field can only be written when the USART is disabled (UE=0). 9 1 read-write PS Even Even parity 0 Odd Odd parity 1 PCE PCE: Parity control enable This bit selects the hardware parity control (generation and detection). When the parity control is enabled, the computed parity is inserted at the MSB position (9th bit if M=1; 8th bit if M=0) and parity is checked on the received data. This bit is set and cleared by software. Once it is set, PCE is active after the current byte (in reception and in transmission). -0: Parity control disabled -1: Parity control enabled This bit field can only be written when the USART is disabled (UE=0). 10 1 read-write PCE Disabled Parity control disabled 0 Enabled Parity control enabled 1 WAKE WAKE: Receiver wakeup method This bit determines the USART wakeup method from Mute mode. It is set or cleared by software. -0: Idle line -1: Address mark This bit field can only be written when the USART is disabled (UE=0). 11 1 read-write WAKE Idle Idle line 0 Address Address mask 1 M0 M0: Word length This bit, with bit 28 (M1) determine the word length. It is set or cleared by software. See Bit -28 (M1)description. This bit can only be written when the USART is disabled (UE=0). 12 1 read-write M0 Bit8 1 start bit, 8 data bits, n stop bits 0 Bit9 1 start bit, 9 data bits, n stop bits 1 MME MME: Mute mode enable This bit activates the mute mode function of the USART. When set, the USART can switch between the active and mute modes, as defined by the WAKE bit. It is set and cleared by software. -0: Receiver in active mode permanently -1: Receiver can switch between mute mode and active mode 13 1 read-write MME Disabled Receiver in active mode permanently 0 Enabled Receiver can switch between mute mode and active mode 1 CMIE CMIE: Character match interrupt enable This bit is set and cleared by software. -0: Interrupt is inhibited -1: A USART interrupt is generated when the CMF bit is set in the USART_ISR register. 14 1 read-write CMIE Disabled Interrupt is disabled 0 Enabled Interrupt is generated when the CMF bit is set in the ISR register 1 DEDT DEDT[4:0]: Driver Enable deassertion time This 5-bit value defines the time between the end of the last stop bit, in a transmitted message, and the de-activation of the DE (Driver Enable) signal. It is expressed in sample time units (1/8 or 1/16 bit time, depending on the oversampling rate). If the USART_TDR register is written during the DEDT time, the new data is transmitted only when the DEDT and DEAT times have both elapsed. This bit field can only be written when the USART is disabled (UE=0). 16 5 read-write 0 31 DEAT DEAT[4:0]: Driver Enable assertion time This 5-bit value defines the time between the activation of the DE (Driver Enable) signal and the beginning of the start bit. It is expressed in sample time units (1/8 or 1/16 bit time, depending on the oversampling rate). This bit field can only be written when the USART is disabled (UE=0). 21 5 read-write 0 31 M1 Word length This bit, with bit 12 (M0) determine the word length. It is set or cleared by software. M[1:0] = 00: 1 Start bit, 8 Data bits, n Stop bit M[1:0] = 01: 1 Start bit, 9 Data bits, n Stop bit M[1:0] = 10: 1 Start bit, 7 Data bits, n Stop bit This bit can only be written when the USART is disabled (UE=0).s 28 1 read-write M1 M0 Use M0 to set the data bits 0 Bit7 1 start bit, 7 data bits, n stop bits 1 FIFOEN FIFOEN :FIFO mode enable This bit is set and cleared by software. -0: FIFO mode is disabled. -1: FIFO mode is enabled. 29 1 read-write FIFOEN Disabled FIFO mode is disabled 0 Enabled FIFO mode is enabled 1 TXFEIE TXFEIE :TXFIFO empty interrupt enable This bit is set and cleared by software. -0: Interrupt is inhibited -1: An USART interrupt is generated when TXFE=1 in the USART_ISR register 30 1 read-write TXFEIE Disabled Interrupt inhibited 0 Enabled USART interrupt generated when TXFE = 1 in the USART_ISR register 1 RXFFIE RXFFIE :RXFIFO Full interrupt enable This bit is set and cleared by software. -0: Interrupt is inhibited -1: An USART interrupt is generated when RXFF=1 in the USART_ISR register 31 1 read-write RXFFIE Disabled Interrupt inhibited 0 Enabled USART interrupt generated when RXFF = 1 in the USART_ISR register 1 CR2 CR2 CR2 register 0x4 0x20 read-write 0x00000000 ADDM7 ADDM7:7-bit Address Detection/4-bit Address Detection This bit is for selection between 4-bit address detection or 7-bit address detection. -0: 4-bit address detection -1: 7-bit address detection (in 8-bit data mode) This bit can only be written when the USART is disabled (UE=0) 4 1 read-write ADDM7 Bit4 4-bit address detection 0 Bit7 7-bit address detection 1 STOP STOP[1:0]: STOP bits These bits are used for programming the stop bits. -00: 1 stop bit -01: 0.5 stop bit. -10: 2 stop bits -11: 1.5 stop bits This bit field can only be written when the USART is disabled (UE=0). 12 2 read-write STOP Stop1 1 stop bit 0 Stop2 2 stop bit 2 SWAP SWAP: Swap TX/RX pins This bit is set and cleared by software. -0: TX/RX pins are used as defined in standard pinout -1: The TX and RX pins functions are swapped. This allows to work in the case of a cross-wired connection to another UART. This bit field can only be written when the USART is disabled (UE=0). 15 1 read-write SWAP Standard TX/RX pins are used as defined in standard pinout 0 Swapped The TX and RX pins functions are swapped 1 RXINV RXINV: RX pin active level inversion This bit is set and cleared by software. -0: RX pin signal works using the standard logic levels (VDD =1/idle, Gnd=0/mark) -1: RX pin signal values are inverted. ((VDD =0/mark, Gnd=1/idle). This allows the use of an external inverter on the RX line. This bit field can only be written when the USART is disabled (UE=0). 16 1 read-write RXINV Standard RX pin signal works using the standard logic levels 0 Inverted RX pin signal values are inverted 1 TXINV TXINV: TX pin active level inversion This bit is set and cleared by software. -0: TX pin signal works using the standard logic levels (VDD =1/idle, Gnd=0/mark) -1: TX pin signal values are inverted. ((VDD =0/mark, Gnd=1/idle). This allows the use of an external inverter on the TX line. This bit field can only be written when the USART is disabled (UE=0). 17 1 read-write TXINV Standard TX pin signal works using the standard logic levels 0 Inverted TX pin signal values are inverted 1 DATAINV DATAINV: Binary data inversion This bit is set and cleared by software. -0: Logical data from the data register are send/received in positive/direct logic. (1=H, 0=L) -1: Logical data from the data register are send/received in negative/inverse logic. (1=L, 0=H). The parity bit is also inverted. This bit field can only be written when the USART is disabled (UE=0). 18 1 read-write DATAINV Positive Logical data from the data register are send/received in positive/direct logic 0 Negative Logical data from the data register are send/received in negative/inverse logic 1 MSBFIRST MSBFIRST: Most significant bit first This bit is set and cleared by software. -0: data is transmitted/received with data bit 0 first, following the start bit. -1: data is transmitted/received with the MSB (bit 7/8) first, following the start bit. This bit field can only be written when the USART is disabled (UE=0). 19 1 read-write MSBFIRST LSB data is transmitted/received with data bit 0 first, following the start bit 0 MSB data is transmitted/received with MSB (bit 7/8/9) first, following the start bit 1 ADD ADD[7:0]: Address of the USART node This bit-field gives the address of the USART node or a character code to be recognized. This is used in multiprocessor communication during Mute mode or Stop mode, for wakeup with 7- bit address mark detection. The MSB of the character sent by the transmitter should be equal to 1. It may also be used for character detection during normal reception, Mute mode inactive (for example, end of block detection in ModBus protocol). In this case, the whole received character (8- bit) is compared to the ADD[7:0] value and CMF flag is set on match. This bit field can only be written when reception is disabled (RE = 0) or the USART is disabled (UE=0) 24 8 read-write 0 255 CR3 CR3 CR3 register 0x8 0x20 read-write 0x00000000 EIE EIE: Error interrupt enable Error Interrupt Enable Bit is required to enable interrupt generation in case of a framing error, overrun error noise flag or SPI slave underrun error (FE=1 or ORE=1 or NF=1or UDR = 1 in the USART_ISR register). -0: Interrupt is inhibited -1: An interrupt is generated when FE=1 or ORE=1 or NF=1 or UDR = 1 (in SPI slave mode) in the USART_ISR register. 0 1 read-write EIE Disabled Interrupt is inhibited 0 Enabled An interrupt is generated when FE=1 or ORE=1 or NF=1 in the ISR register 1 HDSEL HDSEL: Half-duplex selection Selection of Single-wire Half-duplex mode -0: Half duplex mode is not selected -1: Half duplex mode is selected This bit can only be written when the USART is disabled (UE=0). 3 1 read-write HDSEL NotSelected Half duplex mode is not selected 0 Selected Half duplex mode is selected 1 DMAR DMAR: DMA enable receiver This bit is set/reset by software -1: DMA mode is enabled for reception -0: DMA mode is disabled for reception 6 1 read-write DMAR Disabled DMA mode is disabled for reception 0 Enabled DMA mode is enabled for reception 1 DMAT DMAT: DMA enable transmitter This bit is set/reset by software -1: DMA mode is enabled for transmission -0: DMA mode is disabled for transmission 7 1 read-write DMAT Disabled DMA mode is disabled for transmission 0 Enabled DMA mode is enabled for transmission 1 RTSE RTSE: RTS enable -0: RTS hardware flow control disabled -1: RTS output enabled, data is only requested when there is space in the receive buffer. The transmission of data is expected to cease after the current character has been transmitted. The nRTS output is asserted (pulled to 0) when data can be received. This bit can only be written when the USART is disabled (UE=0). 8 1 read-write RTSE Disabled RTS hardware flow control disabled 0 Enabled RTS output enabled, data is only requested when there is space in the receive buffer 1 CTSE CTSE: CTS enable -0: CTS hardware flow control disabled -1: CTS mode enabled, data is only transmitted when the nCTS input is asserted (tied to 0). If the nCTS input is deasserted while data is being transmitted, then the transmission is completed before stopping. If data is written into the data register while nCTS is asserted, the transmission is postponed until nCTS is asserted. This bit can only be written when the USART is disabled (UE=0) 9 1 read-write CTSE Disabled CTS hardware flow control disabled 0 Enabled CTS mode enabled, data is only transmitted when the CTS input is asserted 1 CTSIE CTSIE: CTS interrupt enable -0: Interrupt is inhibited -1: An interrupt is generated whenever CTSIF=1 in the USART_ISR register 10 1 read-write CTSIE Disabled Interrupt is inhibited 0 Enabled An interrupt is generated whenever CTSIF=1 in the ISR register 1 OVRDIS OVRDIS: Overrun Disable This bit is used to disable the receive overrun detection. -0: Overrun Error Flag, ORE, is set when received data is not read before receiving new data. -1: Overrun functionality is disabled. If new data is received while the RXNE flag is still set the ORE flag is not set and the new received data overwrites the previous content of the USART_RDR register. When FIFO mode is enabled, the RXFIFO will be bypassed and data will be written directly in USARTx_RDR register. Even when FIFO management is enabled, the RXNE flag is to be used. This bit can only be written when the USART is disabled (UE=0). 12 1 read-write OVRDIS Enabled Overrun Error Flag, ORE, is set when received data is not read before receiving new data 0 Disabled Overrun functionality is disabled. If new data is received while the RXNE flag is still set the ORE flag is not set and the new received data overwrites the previous content of the RDR register 1 DDRE DDRE: DMA Disable on Reception Error -0: DMA is not disabled in case of reception error. The corresponding error flag is set but RXNE is kept 0 preventing from overrun. As a consequence, the DMA request is not asserted, so the erroneous data is not transferred (no DMA request), but next correct received data will be transferred. (used for Smartcard mode) -1: DMA is disabled following a reception error. The corresponding error flag is set, as well as RXNE. The DMA request is masked until the error flag is cleared. This means that the software must first disable the DMA request (DMAR = 0) or clear RXNE(RXFNE is case FIFO mode is enabled) before clearing the error flag. This bit can only be written when the USART is disabled (UE=0). 13 1 read-write DDRE NotDisabled DMA is not disabled in case of reception error 0 Disabled DMA is disabled following a reception error 1 DEM DEM: Driver enable mode This bit allows the user to activate the external transceiver control, through the DE signal. -0: DE function is disabled. -1: DE function is enabled. The DE signal is output on the RTS pin. This bit can only be written when the USART is disabled (UE=0). 14 1 read-write DEM Disabled DE function is disabled 0 Enabled The DE signal is output on the RTS pin 1 DEP DEP: Driver enable polarity selection -0: DE signal is active high. -1: DE signal is active low. This bit can only be written when the USART is disabled (UE=0). 15 1 read-write DEP High DE signal is active high 0 Low DE signal is active low 1 TXFTIE TXFTIE: TXFIFO threshold interrupt enable This bit is set and cleared by software. -0: Interrupt is inhibited -1: An USART interrupt is generated when TXFIFO reaches the threshold programmed in TXFTCFG. 23 1 read-write TXFTIE Disabled Interrupt inhibited 0 Enabled USART interrupt generated when Transmit FIFO reaches the threshold programmed in TXFTCFG 1 RXFTCFG RXFTCFG: Receive FIFO threshold configuration -000:Receive FIFO reaches 1/8 of its depth. -001:Receive FIFO reaches 1/4 of its depth. -010:Receive FIFO reaches 1/2 of its depth. -011:Receive FIFO reaches 3/4 of its depth. -100:Receive FIFO reaches 7/8 of its depth. -101:Receive FIFO becomes full. Remaining combinations: Reserved. 25 3 read-write RXFTCFG Depth_1_8 RXFIFO reaches 1/8 of its depth 0 Depth_1_4 RXFIFO reaches 1/4 of its depth 1 Depth_1_2 RXFIFO reaches 1/2 of its depth 2 Depth_3_4 RXFIFO reaches 3/4 of its depth 3 Depth_7_8 RXFIFO reaches 7/8 of its depth 4 Full RXFIFO becomes full 5 RXFTIE RXFTIE: RXFIFO threshold interrupt enable This bit is set and cleared by software. -0: Interrupt is inhibited -1: An USART interrupt is generated when Receive FIFO reaches the threshold programmed in RXFTCFG. 28 1 read-write RXFTIE Disabled Interrupt inhibited 0 Enabled USART interrupt generated when Receive FIFO reaches the threshold programmed in RXFTCFG 1 TXFTCFG TXFTCFG: TXFIFO threshold configuration -000:TXFIFO reaches 1/8 of its depth. -001:TXFIFO reaches 1/4 of its depth. -010:TXFIFO reaches 1/2 of its depth. -011:TXFIFO reaches 3/4 of its depth. -100:TXFIFO reaches 7/8 of its depth. -101:TXFIFO becomes empty. Remaining combinations: Reserved. 29 3 read-write TXFTCFG Depth_1_8 TXFIFO reaches 1/8 of its depth 0 Depth_1_4 TXFIFO reaches 1/4 of its depth 1 Depth_1_2 TXFIFO reaches 1/2 of its depth 2 Depth_3_4 TXFIFO reaches 3/4 of its depth 3 Depth_7_8 TXFIFO reaches 7/8 of its depth 4 Empty TXFIFO becomes empty 5 BRR BRR BRR register 0xC 0x20 read-write 0x00000000 BRR BRR[19:0] 0 20 read-write 0 1048575 RQR RQR RQR register 0x18 0x20 read-write 0x00000000 SBKRQ SBKRQ: Send break request Writing 1 to this bit sets the SBKF flag and request to send a BREAK on the line, as soon as the transmit machine is available. 1 1 write-only SBKRQ Break sets the SBKF flag and request to send a BREAK on the line, as soon as the transmit machine is available 1 MMRQ MMRQ: Mute mode request Writing 1 to this bit puts the USART in mute mode and resets the RWU flag. 2 1 write-only MMRQ Mute Puts the USART in mute mode and sets the RWU flag 1 RXFRQ RXFRQ: Receive data flush request Writing 1 to this bit empties the entire receive FIFO i.e. clears the bit RXFNE. This allows to discard the received data without reading them, and avoid an overrun condition. 3 1 write-only RXFRQ Discard clears the RXNE flag. This allows to discard the received data without reading it, and avoid an overrun condition 1 TXFRQ TXFRQ: Transmit data flush request When FIFO mode is disabled, Writing 1 to this bit sets the TXE flag. This allows to discard the transmit data. This bit must be used only in Smartcard mode, when data has not been sent due to errors (NACK) and the FE flag is active in the USART_ISR register. If the USART does not support Smartcard mode, this bit is reserved and forced by hardware to 0 When FIFO is enabled, TXFRQ bit is set to flush the whole FIFO . This will set the flag TXFE (Transmit FIFO empty, bit 23 in the USART_ISR register). Flushing the Transmit FIFO is supported in both UART and Smartcard modes. 4 1 write-only TXFRQ Discard Set the TXE flags. This allows to discard the transmit data 1 ISR ISR ISR register 0x1C 0x20 read-only 0x000000C0 PE PE: Parity error This bit is set by hardware when a parity error occurs in receiver mode. It is cleared by software, writing 1 to the PECF in the USART_ICR register. An interrupt is generated if PEIE = 1 in the USART_CR1 register. -0: No parity error -1: Parity error 0 1 read-only PE NoError No parity error 0 Error Parity error 1 FE FE: Framing error This bit is set by hardware when a de-synchronization, excessive noise or a break character is detected. It is cleared by software, writing 1 to the FECF bit in the USART_ICR register. In Smartcard mode, in transmission, this bit is set when the maximum number of transmit attempts is reached without success (the card NACKs the data frame). An interrupt is generated if EIE = 1 in the USART_CR1 register. -0: No Framing error is detected -1: Framing error or break character is detected 1 1 read-only FE NoError No Framing error is detected 0 Error Framing error or break character is detected 1 NF NF: START bit Noise detection flag This bit is set by hardware when noise is detected on a received frame. It is cleared by software, writing 1 to the NFCF bit in the USART_ICR register. -0: No noise is detected -1: Noise is detected 2 1 read-only NF NoNoise No noise is detected 0 Noise Noise is detected 1 ORE ORE: Overrun error This bit is set by hardware when the data currently being received in the shift register is ready to be transferred into the USARTx_RDR register while RXNE=1 (RXFF = 1 in case FIFO mode is enabled) . It is cleared by a software, writing 1 to the ORECF, in the USARTx_ICR register. An interrupt is generated if RXNEIE/ RXFNEIE=1 or EIE = 1 in the USARTx_CR1 register. -0: No overrun error -1: Overrun error is detected 3 1 read-only ORE NoOverrun No Overrun error 0 Overrun Overrun error is detected 1 IDLE IDLE: Idle line detected This bit is set by hardware when an Idle Line is detected. An interrupt is generated if IDLEIE=1 in the USART_CR1 register. It is cleared by software, writing 1 to the IDLECF in the USART_ICR register. -0: No Idle line is detected -1: Idle line is detected 4 1 read-only IDLE NoIdle No Idle Line is detected 0 Idle Idle Line is detected 1 RXNE RXNE/RXFNE:Read data register not empty/RXFIFO not empty RXNE bit is set by hardware when the content of the USARTx_RDR shift register has been transferred to the USARTx_RDR register. It is cleared by a read to the USARTx_RDR register. The RXNE flag can also be cleared by writing 1 to the RXFRQ in the USARTx_RQR register. RXFNE bit is set by hardware when the RXFIFO is not empty, and so data can be read from the USART_RDR register. Every read of the USART_RDR frees a location in the RXFIFO. It is cleared when the RXFIFO is empty. The RXNE/RXFNE flag can also be cleared by writing 1 to the RXFRQ in the USART_RQR register. An interrupt is generated if RXNEIE/RXFNEIE=1 in the USART_CR1 register. -0: Data is not received -1: Received data is ready to be read. 5 1 read-only RXNE NoData Data is not received 0 DataReady Received data is ready to be read 1 TC TC: Transmission complete This bit indicates when the last data written in the USART_TDR has been transmitted out of the shift register. It is set by hardware if the transmission of a frame containing data is complete and if TXE/TXFE is set. An interrupt is generated if TCIE=1 in the USART_CR1 register. It is cleared by software, writing 1 to the TCCF in the USART_ICR register or by a write to the USART_TDR register. An interrupt is generated if TCIE=1 in the USART_CR1 register. -0: Transmission is not complete -1: Transmission is complete 6 1 read-only TC TxNotComplete Transmission is not complete 0 TxComplete Transmission is complete 1 TXE TXE/TXFNF: Transmit data register empty/TXFIFO not full When FIFO mode is disabled, TXE is set by hardware when the content of the USARTx_TDR register has been transferred into the shift register. It is cleared by a write to the USARTx_TDR register. The TXE flag can also be set by writing 1 to the TXFRQ in the USART_RQR register, in order to discard the data (only in Smartcard T=0 mode, in case of transmission failure). When FIFO mode is enabled, TXFNF is set by hardware when TXFIFO is not full, and so data can be written in the USART_TDR. Every write in the USART_TDR places the data in the TXFIFO. This flag remains set until the TXFIFO is full. When the TXFIFO is full, this flag is cleared indicating that data can not be written into the USART_TDR. Note: The TXFNF is kept reset during the flush request until TXFIFO is empty . After sending the flush request (by setting TXFRQ bit), the flag TXFNF should be checked prior to writing in TXFIFO. (TXFNF and TXFE will be set at the same time). An interrupt is generated if the TXEIE/TXFNFIE bit =1 in the USART_CR1 register. -0: Data register is full/Transmit FIFO is full. -1: Data register/Transmit FIFO is not full 7 1 read-only TXE Full Transmit FIFO is full 0 NotFull Transmit FIFO is not full 1 CTSIF CTSIF: CTS interrupt flag This bit is set by hardware when the nCTS input toggles, if the CTSE bit is set. It is cleared by software, by writing 1 to the CTSCF bit in the USART_ICR register. An interrupt is generated if CTSIE=1 in the USART_CR3 register. -0: No change occurred on the nCTS status line -1: A change occurred on the nCTS status line 9 1 read-only CTSIF NotChanged No change occurred on the CTS status line 0 Changed A change occurred on the CTS status line 1 CTS CTS: CTS flag This bit is set/reset by hardware. It is an inverted copy of the status of the nCTS input pin. -0: nCTS line set -1: nCTS line reset 10 1 read-only CTS Set CTS line set 0 Reset CTS line reset 1 BUSY BUSY: Busy flag This bit is set and reset by hardware. It is active when a communication is ongoing on the RX line (successful start bit detected). It is reset at the end of the reception (successful or not). -0: USART is idle (no reception) -1: Reception on going 16 1 read-only BUSY Idle USART is idle (no reception) 0 Busy Reception on going 1 CMF CMF: Character match flag This bit is set by hardware, when a the character defined by ADD[7:0] is received. It is cleared by software, writing 1 to the CMCF in the USART_ICR register. An interrupt is generated if CMIE=1in the USART_CR1 register. -0: No Character match detected -1: Character Match detected 17 1 read-only CMF NoMatch No Character match detected 0 Match Character match detected 1 SBKF SBKF: Send break flag This bit indicates that a send break character was requested. It is set by software, by writing 1 to the SBKRQ bit in the USART_CR3 register. It is automatically reset by hardware during the stop bit of break transmission. -0: No break character is transmitted -1: Break character will be transmitted 18 1 read-only SBKF NoBreak No break character transmitted 0 Break Break character transmitted 1 RWU RWU: Receiver wakeup from Mute mode This bit indicates if the USART is in mute mode. It is cleared/set by hardware when a wakeup/mute sequence is recognized. The mute mode control sequence (address or IDLE) is selected by the WAKE bit in the USART_CR1 register. When wakeup on IDLE mode is selected, this bit can only be set by software, writing 1 to the MMRQ bit in the USART_RQR register. -0: Receiver in active mode -1: Receiver in mute mode 19 1 read-only TEACK TEACK: Transmit enable acknowledge flag This bit is set/reset by hardware, when the Transmit Enable value is taken into account by the USART. It can be used when an idle frame request is generated by writing TE=0, followed by TE=1 in the USART_CR1 register, in order to respect the TE=0 minimum period. 21 1 read-only REACK REACK: Receive enable acknowledge flag This bit is set/reset by hardware, when the Receive Enable value is taken into account by the USART. It can be used to verify that the USART is ready for reception before entering Stop mode. 22 1 read-only TXFE TXFE: TXFIFO Empty This bit is set by hardware when TXFIFO is Empty. When the TXFIFO contains at least one data, this flag is cleared. The TXFE flag can also be set by writing 1 to the bit TXFRQ (bit 4) in the USART_RQR register. An interrupt is generated if the TXFEIE bit =1 (bit 30) in the USART_CR1 register. -0: TXFIFO is not empty. -1: TXFIFO is empty. 23 1 read-only TXFE NotEmpty TXFIFO not empty. 0 Empty TXFIFO empty. 1 RXFF RXFF: RXFIFO Full This bit is set by hardware when RXFIFO is Full. An interrupt is generated if the RXFFIE bit =1 in the USART_CR1 register. -0: RXFIFO is not Full. -1: RXFIFO is Full. 24 1 read-only RXFF NotFull RXFIFO not full. 0 Full RXFIFO Full. 1 RXFT RXFT: RXFIFO threshold flag This bit is set by hardware when the programmed threshold in RXFTCFG in USARTx_CR3 register is reached. This means that there are (RXFTCFG - 1) data in the Receive FIFO and one data in the USART_RDR register. An interrupt is generated if the RXFTIE bit =1 (bit 27) in the USART_CR3 register. -0: Receive FIFO doesnt reach the programmed threshold. -1: Receive FIFO reached the programmed threshold 26 1 read-only RXFT NotReached Receive FIFO does not reach the programmed threshold. 0 Reached Receive FIFO reached the programmed threshold. 1 TXFT TXFT: TXFIFO threshold flag This bit is set by hardware when the TXFIFO reaches the programmed threshold in TXFTCFG in USARTx_CR3 register i.e. the TXFIFO contains TXFTCFG empty locations. An interrupt is generated if the TXFTIE bit =1 (bit 31) in the USART_CR3 register. -0: TXFIFO doesnt reach the programmed threshold. -1: TXFIFO reached the programmed threshold 27 1 read-only TXFT NotReached TXFIFO does not reach the programmed threshold. 0 Reached TXFIFO reached the programmed threshold. 1 ICR ICR ICR register 0x20 0x20 read-write 0x00000000 PECF PECF: Parity error clear flag Writing 1 to this bit clears the PE flag in the USART_ISR register. 0 1 write-only oneToClear PECF Clear Clears the PE flag in the ISR register 1 FECF FECF: Framing error clear flag Writing 1 to this bit clears the FE flag in the USART_ISR register 1 1 write-only oneToClear FECF Clear Clears the FE flag in the ISR register 1 NECF NECF: Noise detected clear flag Writing 1 to this bit clears the NF flag in the USART_ISR register. 2 1 write-only oneToClear NECF Clear Clears the NF flag in the ISR register 1 ORECF ORECF: Overrun error clear flag Writing 1 to this bit clears the ORE flag in the USART_ISR register. 3 1 write-only oneToClear ORECF Clear Clears the ORE flag in the ISR register 1 IDLECF IDLECF: Idle line detected clear flag Writing 1 to this bit clears the IDLE flag in the USART_ISR register. 4 1 write-only oneToClear IDLECF Clear Clears the IDLE flag in the ISR register 1 TCCF TCCF: Transmission complete clear flag Writing 1 to this bit clears the TC flag in the USART_ISR register 6 1 write-only oneToClear TCCF Clear Clears the TC flag in the ISR register 1 CTSCF CTSCF: CTS clear flag Writing 1 to this bit clears the CTSIF flag in the USART_ISR register 9 1 write-only oneToClear CTSCF Clear Clears the CTSIF flag in the ISR register 1 CMCF CMCF: Character match clear flag Writing 1 to this bit clears the CMF flag in the USART_ISR register 17 1 write-only oneToClear CMCF Clear Clears the CMF flag in the ISR register 1 WUCF WUCF: Wakeup from Stop mode clear flag Writing 1 to this bit clears the WUF flag in the LPUART_ISR register 20 1 write-only oneToClear RDR RDR RDR register 0x24 0x20 read-only 0x00000000 RDR RDR[8:0]: Receive data value Contains the received data character. The RDR register provides the parallel interface between the input shift register and the internal bus (see Figure 124). When receiving with the parity enabled, the value read in the MSB bit is the received parity bit. 0 9 read-only 0 511 TDR TDR TDR register 0x28 0x20 read-write 0x00000000 TDR TDR[8:0]: Transmit data value Contains the data character to be transmitted. The USARTx_TDR register provides the parallel interface between the internal bus and the output shift register (see Figure 124). When transmitting with the parity enabled (PCE bit set to 1 in the USART_CR1 register), the value written in the MSB (bit 7 or bit 8 depending on the data length) has no effect because it is replaced by the parity. Note: This register must be written only when TXE/TXFNF=1. 0 9 read-write 0 511 PRESC PRESC PRESC register 0x2C 0x20 read-write PRESCALER PRESCALER[3:0]: Clock prescaler The USART input clock can be divided by a prescaler: -0000: input clock not divided -0001: input clock divided by 2 -0010: input clock divided by 4 -0011: input clock divided by 6 -0100: input clock divided by 8 -0101: input clock divided by 10 -0110: input clock divided by 12 -0111: input clock divided by 16 -1000: input clock divided by 32 -1001: input clock divided by 64 -1010: input clock divided by 128 -1011: input clock divided by 256 Remaing combinations: Reserved. Note: When PRESCALER is programmed with a value different of the allowed ones, programmed prescaler value will be 1011 i.e. input clock divided by 256 0 4 read-write PRESCALER Div1 /1 0 Div2 /2 1 Div4 /4 2 Div6 /6 3 Div8 /8 4 Div10 /10 5 Div12 /12 6 Div16 /16 7 Div32 /32 8 Div64 /64 9 Div128 /128 10 Div256 /256 11 SPI2 SPI 0x41003000 SPI2 SPI2 interrupt 6 I2C2 I2C2 0x41001000 I2C2 I2C2 interrupt 4 RTC RTC 0x40004000 0x0 0x58 registers RTC RTC interrupt 11 TR TR RTC_TR register 0x0 0x20 read-write 0x00000000 SU Second units in BCD format. 0 4 read-write ST Second tens in BCD format. 4 3 read-write MNU Minute units in BCD format. 8 4 read-write MNT Minute tens in BCD format. 12 3 read-write HU Hour units in BCD format. 16 4 read-write HT Hour tens in BCD format. 20 2 read-write PM AM/PM notation. 0: AM or 24-hour format 1: PM 22 1 read-write DR DR RTC_DR register 0x4 0x20 read-write 0x00002101 DU Date units in BCD format. 0 4 read-write DT Date tens in BCD format. 4 2 read-write MU Month units in BCD format. 8 4 read-write MT Month tens in BCD format. 12 1 read-write WDU Week day units 000: forbidden 001: Monday 010: Tuesday 011: Wednesday 100: Thursday 101: Friday 110: Saturday 111: Sunday 13 3 read-write YU Year units in BCD format. 16 4 read-write YT Year tens in BCD format. 20 4 read-write CR CR RTC_CR register 0x8 0x20 read-write 0x00000000 WUCKSEL Wakeup clock selection 000: RTC/16 clock is selected 001: RTC/8 clock is selected 010: RTC/4 clock is selected 011: RTC/2 clock is selected 10x: ck_spre (usually 1 Hz) clock is selected 11x: ck_spre (usually 1 Hz) clock is selected and 216 is added to the WUT counter value 0 3 read-write BYPSHAD Bypass the shadow registers 0: Calendar values (when reading from RTC_SSR, RTC_TR, and RTC_DR) are taken from the shadow registers, which are updated once every two RTCCLK cycles. 1: Calendar values (when reading from RTC_SSR, RTC_TR, and RTC_DR) are taken directly from the calendar counters. 5 1 read-write FMT Hour format 6 1 read-write ALRAE Alarm A enable 0: Alarm A disabled 1: Alarm A enabled 8 1 read-write WUTE Wakeup timer enable 0: Wakeup timer disabled 1: Wakeup timer enabled 10 1 read-write ALRAIE Alarm A interrupt enable 0: Alarm A interrupt disabled 1: Alarm A interrupt enabled 12 1 read-write WUTIE Wakeup timer interrupt enable 0: Wakeup timer interrupt disabled 1: Wakeup timer interrupt enabled 14 1 read-write ADD1H Add 1 hour (summer time change) When this bit is set outside initialization mode, 1 hour is added to the calendar time. This bit is always read as 0. 0: No effect 1: Adds 1 hour to the current time. This can be used for summer time change 16 1 write-only SUB1H Subtract 1 hour (winter time change) When this bit is set outside initialization mode, 1 hour is subtracted to the calendar time if the current hour is not 0. This bit is always read as 0. Setting this bit has no effect when current hour is 0. 0: No effect 1: Subtracts 1 hour to the current time. This can be used for winter time change. 17 1 write-only BKP Backup This bit can be written by the user to memorize whether the daylight saving time change has been performed or not. 18 1 read-write COSEL Calibration output selection When COE=1, this bit selects which signal is output on RTC_CALIB. 0: Calibration output is 512 Hz 1: Calibration output is 1 Hz These frequencies are valid for RTCCLK at 32.768 kHz and prescalers at their default values (PREDIV_A=127 and PREDIV_S=255). 19 1 read-write POL Output polarity This bit is used to configure the polarity of RTC_ALARM output 0: The pin is high when ALRAF/WUTF is asserted (depending on OSEL[1:0]) 1: The pin is low when ALRAF/WUTF is asserted (depending on OSEL[1:0]). 20 1 read-write OSEL Output selection These bits are used to select the flag to be routed to RTC_ALARM output 00: Output disabled 01: Alarm A output enabled 10: Reserved 11: Wakeup output enabled 21 2 read-write COE Calibration output enable This bit enables the RTC_CALIB output 0: Calibration output disabled 1: Calibration output enabled 23 1 read-write ISR ISR RTC_ISR register 0xC 0x20 read-write 0x00000007 ALRAWF Alarm A write flag This bit is set by hardware when Alarm A values can be changed, after the ALRAE bit has been set to 0 in RTC_CR. It is cleared by hardware in initialization mode. 0: Alarm A update not allowed 1: Alarm A update allowed. 0 1 read-only WUTWF Wakeup timer write flag This bit is set by hardware when the wakeup timer values can be changed, after the WUTE bit has been set to 0 in RTC_CR. 0: Wakeup timer configuration update not allowed 1: Wakeup timer configuration update allowed. 2 1 read-only SHPF Shift operation pending 0: No shift operation is pending 1: A shift operation is pending This flag is set by hardware as soon as a shift operation is initiated by a write to the RTC_SHIFTR register. It is cleared by hardware when the corresponding shift operation has been executed. Writing to the SHPF bit has no effect. 3 1 read-write INITS Initialization status flag This bit is set by hardware when the calendar year field is different from 0 (power-on reset state). 0: Calendar has not been initialized 1: Calendar has been initialized 4 1 read-only RSF Registers synchronization flag This bit is set by hardware each time the calendar registers are copied into the shadow registers (RTC_SSRx, RTC_TRx and RTC_DRx). This bit is cleared by hardware in initialization mode, while a shift operation is pending (SHPF=1), or when in bypass shadow regsiter mode (BYPSHAD=1). This bit can also be cleared by software. It is cleared either by software or by hardware in initialization mode. 0: Calendar shadow registers not yet synchronized 1: Calendar shadow registers synchronized. 5 1 read-write INITF Initialization flag When this bit is set to 1, the RTC is in initialization state, and the time, date and prescaler registers can be updated. 0: Calendar registers update is not allowed 1: Calendar registers update is allowed. 6 1 read-only INIT Initialization mode 0: Free running mode 1: Initialization mode used to program time and date register (RTC_TR and RTC_DR), and prescaler register (RTC_PRER). Counters are stopped and start counting from the new value when INIT is reset. 7 1 read-write ALRAF Alarm A flag This flag is set by hardware when the time/date registers (RTC_TR and RTC_DR) match the Alarm A register (RTC_ALRMAR). This flag is cleared by software by writing 0. 8 1 read-write WUTF Wakeup timer flag This flag is set by hardware when the wakeup auto-reload counter reaches 0. This flag is cleared by software by writing 0. This flag must be cleared by software at least 1.5 RTCCLK periods before WUTF is set to 1 again. 10 1 read-write RECALPF Recalibration pending Flag The RECALPF status flag is automatically set to 1 when software writes to the RTC_CALR register, indicating that the RTC_CALR register is blocked. When the new calibration settings are taken into account, this bit returns to 0. 16 1 read-write PRER PRER RTC_PRER register 0x10 0x20 read-write 0x007F00FF PREDIV_S Synchronous prescaler factor This is the synchronous division factor: ck_spre frequency = ck_apre frequency/(PREDIV_S+1) 0 15 read-write PREDIV_A Asynchronous prescaler factor This is the asynchronous division factor: ck_apre frequency = RTCCLK frequency/(PREDIV_A+1) 16 7 read-write WUTR WUTR RTC_WUTR register 0x14 0x20 read-write 0x0000FFFF WUT Wakeup auto-reload value bits When the wakeup timer is enabled (WUTE set to 1), the WUTF flag is set every (WUT[15:0] + 1) ck_wut cycles. The ck_wut period is selected through WUCKSEL[2:0] bits of the RTC_CR register When WUCKSEL[2] = 1, the wakeup timer becomes 17-bits and WUCKSEL[1] effectively becomes WUT[16] the most-significant bit to be reloaded into the timer. The first assertion of WUTF occurs (WUT+1) ck_wut cycles after WUTE is set. Setting WUT[15:0] to 0x0000 with WUCKSEL[2:0] =011 (RTCCLK/2) is forbidden. 0 16 read-write ALRMAR ALRMAR RTC_ALRMAR register 0x1C 0x20 read-write 0x00000000 SU Second units in BCD format. 0 4 read-write ST Second tens in BCD format. 4 3 read-write MSK1 Alarm A seconds mask 0: Alarm A set if the seconds match 1: Seconds dont care in Alarm A comparison 7 1 read-write MNU Minute units in BCD format. 8 4 read-write MNT Minute tens in BCD format. 12 3 read-write MSK2 Alarm A minutes mask 0: Alarm A set if the minutes match 1: Minutes dont care in Alarm A comparison 15 1 read-write HU Hour units in BCD format. 16 4 read-write HT Hour tens in BCD format. 20 2 read-write PM AM/PM notation 0: AM or 24-hour format 1: PM 22 1 read-write MSK3 Alarm A hours mask 0: Alarm A set if the hours match 1: Hours dont care in Alarm A comparison 23 1 read-write DU Date units or day in BCD format. 24 4 read-write DT Date tens in BCD format. 28 2 read-write WDSEL Week day selection 0: DU[3:0] represents the date units 1: DU[3:0] represents the week day. DT[1:0] is dont care. 30 1 read-write MSK4 Alarm A date mask 0: Alarm A set if the date/day match 1: Date/day dont care in Alarm A comparison 31 1 read-write WPR WPR RTC_WPR register 0x24 0x20 read-write 0x00000000 KEY Write protection key This byte is written by software. Reading this byte always returns 0x00 0 8 write-only SSR SSR RTC_SSR register 0x28 0x20 read-only 0x00000000 SS Sub second value SS[15:0] is the value in the synchronous prescalers counter. The fraction of a second is given by the formula below: Second fraction = ( PREDIV_S - SS ) / ( PREDIV_S + 1 ) 0 16 read-only SHIFTR SHIFTR RTC_SHIFTR register 0x2C 0x20 read-write 0x00000000 SUBFS Subtract a fraction of a second These bits are write only and is always read as zero. Writing to this bit has no effect when a shift operation is pending (when SHPF=1, in RTC_ISR). The value which is written to SUBFS is added to the synchronous prescalers counter. Since this counter counts down, this operation effectively subtracts from (delays) the clock by: Delay (seconds) = SUBFS / ( PREDIV_S + 1 ) A fraction of a second can effectively be added to the clock (advancing the clock) when the ADD1S function is used in conjunction with SUBFS, effectively advancing the clock by : Advance (seconds) = ( 1 - ( SUBFS / ( PREDIV_S + 1 ) ) ) . 0 15 write-only ADD1S Add one second 0: No effect 1: Add one second to the clock/calendar This bit is write only and is always read as zero. Writing to this bit has no effect when a shift operation is pending (when SHPF=1, in RTC_ISR). This function is intended to be used with SUBFS (see description below) in order to effectively add a fraction of a second to the clock in an atomic operation. 31 1 write-only CALR CALR RTC_CALR register 0x3C 0x20 read-write 0x00000000 CALM Calibration minus The frequency of the calendar is reduced by masking CALM out of 220 RTCCLK pulses (32 seconds if the input frequency is 32768 Hz). This decreases the frequency of the calendar with a resolution of 0.9537 ppm. To increase the frequency of the calendar, this feature should be used in conjunction with CALP. 0 9 read-write CALW16 Use a 16-second calibration cycle period When CALW16 is set to 1 , the 16-second calibration cycle period is selected.This bit must not be set to 1 if CALW8=1. Note: CALM[0] is stucked at 0 when CALW16=1. 13 1 read-write CALW8 Use an 8-second calibration cycle period When CALW8 is set to 1 , the 8-second calibration cycle period is selected. Note: CALM[1:0] are stucked at 00 when CALW8=1. 14 1 read-write CALP Increase frequency of RTC by 488.5 ppm 0: No RTCCLK pulses are added. 1: One RTCCLK pulse is effectively inserted every 211 pulses (frequency incresed by 488.5 ppm). This feature is intended to be used in conjunction with CALM, which lowers the frequency of the calendar with a fine resolution. if the input frequency is 32768 Hz, the number of RTCCLK pulses added during a 32-second window is calculated as follows: (512 * CALP) - CALM. 15 1 read-write ALRMASSR ALRMASSR RTC_ALRMASSR register 0x44 0x20 read-write 0x00000000 SS Sub seconds value This value is compared with the contents of the synchronous prescalers counter to determine if Alarm A is to be activated. Only bits 0 up MASKSS-1 are compared. 0 15 read-write MASKSS Mask the most-significant bits starting at this bit 0: No comparison on sub seconds for Alarm A. The alarm is set when the seconds unit is incremented (assuming that the rest of the fields match). 1: SS[14:1] are dont care in Alarm A comparison. Only SS[0] is compared. 2: SS[14:2] are dont care in Alarm A comparison. Only SS[1:0] are compared. 3: SS[14:3] are dont care in Alarm A comparison. Only SS[2:0] are compared. ... 12: SS[14:12] are dont care in Alarm A comparison. SS[11:0] are compared. 13: SS[14:13] are dont care in Alarm A comparison. SS[12:0] are compared. 14: SS[14] is dont care in Alarm A comparison. SS[13:0] are compared. 15: All 15 SS bits are compared and must match to activate alarm. The overflow bits of the synchronous counter (bits 15) is never compared. This bit can be different from 0 only after a shift operation. 24 4 read-write BKP0R BKP0R RTC_BKP0R register 0x50 0x20 read-write 0x00000000 BKP The application can write or read data to and from these registers. They are powered-on by VDD12o so they are retained during DEEPSTOP mode. The application can write or read data to and from these registers. This register is reset on PORESETn only. 0 32 read-write BKP1R BKP1R RTC_BKP1R register 0x54 0x20 read-write BKP The application can write or read data to and from these registers. They are powered-on by VDD12o so they are retained during DEEPSTOP mode. The application can write or read data to and from these registers. This register is reset on PORESETn only. 0 32 read-write IWDG IWDG 0x40003000 0x0 0x14 registers KR KR IWDG_KR register 0x0 0x10 read-write 0x00000000 KEY Key value. Software can only write these bits. Reading returns the reset value. These bits must be written by software at regular intervals with the key value 0xAAAA, otherwise the watchdog generates a reset when the counter reaches 0. Writing the key value 0x5555 to enables access to the IWDG_PR, IWDG_RLR and IWDG_WINR registers. Writing the key value CCCCh starts the watchdog 0 16 write-only KEY Unlock Enable access to PR, RLR and WINR registers 21845 Feed Feed watchdog with RLR register value 43690 Start Start the watchdog 52428 PR PR IWDG_PR register 0x4 0x10 read-write 0x00000000 PR Prescaler divider. Set and reset by software. These bits are write access protected. They are written by software to select the prescaler divider feeding the counter clock. PVU bit of IWDG_SR must be reset in order to be able to change the prescaler divider. 000: divider/4 001: divider/8 010: divider/16 011: divider/32 100: divider/64 101: divider/128 110: divider/256 111: divider/256 0 3 read-write PR DivideBy4 Divider /4 0 DivideBy8 Divider /8 1 DivideBy16 Divider /16 2 DivideBy32 Divider /32 3 DivideBy64 Divider /64 4 DivideBy128 Divider /128 5 DivideBy256 Divider /256 true RLR RLR IWDG_RLR register 0x8 0x10 read-write 0x00000FFF RL Watchdog counter reload value. Set and reset by software. These bits are write access protected. They are written by software to define the value to be loaded in the watchdog counter each time the value 0xAAAA is written in the IWDG_KR register. The watchdog counter counts down from this value. The timeout period is a function of this value and the clock prescaler. The RVU bit in the IWDG_SR register must be reset in order to be able to change the reload value. 0 12 read-write 0 4095 SR SR IWDG_SR register 0xC 0x10 read-only 0x00000000 PVU Watchdog prescaler value update. Read only bit. This bit is set by hardware to indicate that an update of the prescaler value is ongoing. It is reset by hardware when the prescaler update operation is completed in the VDD voltage domain (takes up to 5 RC 40 kHz cycles). Prescaler value can be updated only when PVU bit is reset 0 1 read-only RVU Watchdog counter reload value update. Read only bit. This bit is set by hardware to indicate that an update of the reload value is ongoing. It is reset by hardware when the reload value update operation is completed in the VDD voltage domain (takes up to 5 RC 40 kHz cycles). Reload value can be updated only when RVU bit is reset 1 1 read-only WVU Watchdog counter window value update. Read only bit. This bit is set by hardware to indicate that an update of the window value is ongoing. It is reset by hardware when the reload value update operation is completed in the VDD voltage domain (takes up to 5 RC 40 kHz cycles). Window value can be updated only when WVU bit is reset. This bit is generated only if generic window = 1 2 1 read-only WINR WINR IWDG_WINR register 0x10 0x10 read-write WIN Watchdog counter window value. Set and reset by software. These bits are write access protected. These bits contain the high limit of the window value to be compared to the downcounter. To prevent a reset, the downcounter must be reloaded when its value is lower than the window register value and greater than 0x0 The WVU bit in the IWDG_SR register must be reset in order to be able to change the reload value. 0 12 read-write 0 4095 TIM1 TIM 0x40002000 0x0 0x68 registers TIM1 TIM1 interrupt 10 CR1 CR1 CR1 register 0x0 0x20 read-write 0x00000000 0x0000000F CEN CEN: Counter enable 0: Counter disabled 1: Counter enabled Note: External clock and gated mode can work only if the CEN bit has been previously set by software. However trigger mode can set the CEN bit automatically by hardware. 0 1 read-write CEN Disabled Counter disabled 0 Enabled Counter enabled 1 UDIS UDIS: Update disable This bit is set and cleared by software to enable/disable UEV event generation. 0: UEV enabled. The Update (UEV) event is generated by one of the following events: - Counter overflow/underflow - Setting the UG bit - Update generation through the slave mode controller Buffered registers are then loaded with their preload values. 1: UEV disabled. The Update event is not generated, shadow registers keep their value (ARR, PSC, CCRx). However the counter and the prescaler are reinitialized if the UG bit is set or if a hardware reset is received from the slave mode controller. 1 1 read-write UDIS Enabled Update event enabled 0 Disabled Update event disabled 1 URS URS: Update request source This bit is set and cleared by software to select the UEV event sources. 0: Any of the following events generate an update interrupt or DMA request if enabled. These events can be: - Counter overflow/underflow - Setting the UG bit - Update generation through the slave mode controller 1: Only counter overflow/underflow generates an update interrupt or DMA request if enabled. 2 1 read-write URS AnyEvent Any of counter overflow/underflow, setting UG, or update through slave mode, generates an update interrupt or DMA request 0 CounterOnly Only counter overflow/underflow generates an update interrupt or DMA request 1 OPM OPM: One pulse mode 0: Counter is not stopped at update event. 1: Counter stops counting at the next update event (clearing the bit CEN) 3 1 read-write OPM Disabled Counter is not stopped at update event 0 Enabled Counter stops counting at the next update event (clearing the CEN bit) 1 DIR DIR: Direction 0: Counter used as upcounter 1: Counter used as downcounter Note: This bit is read only when the timer is configured in Center-aligned mode or Encoder mode. 4 1 read-write DIR Up Counter used as upcounter 0 Down Counter used as downcounter 1 CMS CMS[1:0]: Center-aligned mode selection 00: Edge-aligned mode. The counter counts up or down depending on the direction bit (DIR). 01: Center-aligned mode 1. The counter counts up and down alternatively. Output compare interrupt flags of channels configured in output (CCxS=00 in TIMx_CCMRx register) are set only when the counter is counting down. 10: Center-aligned mode 2. The counter counts up and down alternatively. Output compare interrupt flags of channels configured in output (CCxS=00 in TIMx_CCMRx register) are set only when the counter is counting up. 11: Center-aligned mode 3. The counter counts up and down alternatively. Output compare interrupt flags of channels configured in output (CCxS=00 in TIMx_CCMRx register) are set both when the counter is counting up or down. Note: It is not allowed to switch from edge-aligned mode to center-aligned mode as long as the counter is enabled (CEN=1) 5 2 read-write CMS EdgeAligned The counter counts up or down depending on the direction bit 0 CenterAligned1 The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting down. 1 CenterAligned2 The counter counts up and down alternatively. Output compare interrupt flags are set only when the counter is counting up. 2 CenterAligned3 The counter counts up and down alternatively. Output compare interrupt flags are set both when the counter is counting up or down. 3 ARPE ARPE: Auto-reload preload enable 0: TIMx_ARR register is not buffered 1: TIMx_ARR register is buffered 7 1 read-write ARPE Disabled TIMx_APRR register is not buffered 0 Enabled TIMx_APRR register is buffered 1 CKD CKD[1:0]: Clock division This bit-field indicates the division ratio between the timer clock (CK_INT) frequency and the dead-time and sampling clock (tDTS)used by the dead-time generators and the digital filters (TIx), 00: tDTS=tCK_INT 01: tDTS=2*tCK_INT 10: tDTS=4*tCK_INT 11: Reserved, do not program this value 8 2 read-write CKD Div1 t_DTS = t_CK_INT 0 Div2 t_DTS = 2 Ã t_CK_INT 1 Div4 t_DTS = 4 Ã t_CK_INT 2 UIFREMAP UIFREMAP: UIF status bit remapping 0: No remapping. UIF status bit is not copied to TIMx_CNT register bit 31. 1: Remapping enabled. UIF status bit is copied to TIMx_CNT register bit 31. 11 1 read-write CR2 CR2 CR2 register 0x4 0x20 read-write 0x00000000 0x0000000F CCPC Capture/compare preloaded control. 0 1 read-write CCPC NotPreloaded CCxE, CCxNE and OCxM bits are not preloaded 0 Preloaded CCxE, CCxNE and OCxM bits are preloaded 1 CCUS Capture/compare control update selection. 2 1 read-write CCUS Sw When capture/compare control bits are preloaded (CCPC=1), they are updated by setting the COMG bit only 0 SwOrEdge When capture/compare control bits are preloaded (CCPC=1), they are updated by setting the COMG bit or when an rising edge occurs on TRGI 1 TI1S TI1S: TI1 selection 0: The TIMx_CH1 pin is connected to TI1 input. 1: The TIMx_CH1, CH2 and CH3 pins are connected to the TI1 input (XOR combination) 7 1 read-write 6 0x2 1-6 OIS%s Output Idle state (OC%s output) 8 1 read-write OIS1 Reset OCx=0 (after a dead-time if OCx(N) is implemented) when MOE=0 0 Set OCx=1 (after a dead-time if OCx(N) is implemented) when MOE=0 1 3 0x2 1-3 OIS%sN Output Idle state (OC%sN output) 9 1 read-write OIS1N Reset OCxN=0 after a dead-time when MOE=0 0 Set OCxN=1 after a dead-time when MOE=0 1 SMCR SMCR SMCR register 0x8 0x20 read-write 0x00000000 0x00000000 SMS SMS: Slave mode selection When external signals are selected the active edge of the trigger signal (TRGI) is linked to the polarity selected on the external input (see Input Control register and Control Register description. 0000: Slave mode disabled - if CEN = '1' then the prescaler is clocked directly by the internal clock. 0001: Encoder mode 1 - Counter counts up/down on TI2FP2 edge depending on TI1FP1 level. 0010: Encoder mode 2 - Counter counts up/down on TI1FP1 edge depending on TI2FP2 level. 0011: Encoder mode 3 - Counter counts up/down on both TI1FP1 and TI2FP2 edges depending on the level of the other input. 0100: Reset Mode - Rising edge of the selected trigger input (TRGI) reinitializes the counter and generates an update of the registers. 0101: Gated Mode - The counter clock is enabled when the trigger input (TRGI) is high. The counter stops (but is not reset) as soon as the trigger becomes low. Both start and stop of the counter are controlled. 0110: Trigger Mode - The counter starts at a rising edge of the trigger TRGI (but it is not reset). Only the start of the counter is controlled. 0111: External Clock Mode 1 - Rising edges of the selected trigger (TRGI) clock the counter. 1000: Combined reset + trigger mode - Rising edge of the selected trigger input (TRGI) reinitializes the counter, generates an update of the registers and starts the counter. Codes above 1000: Reserved. Note: The gated mode must not be used if TI1F_ED is selected as the trigger input (TS='100'). Indeed, TI1F_ED outputs 1 pulse for each transition on TI1F, whereas the gated mode checks the level of the trigger signal. 0 3 read-write OCCS OCCS: OCREF clear selection This bit is used to select the OCREF clear source. 0: OCREF_CLR_INT is connected to the OCREF_CLR input (stuck at 0 so no effect) 1: OCREF_CLR_INT is connected to ETRF 3 1 read-write TS TS[2:0]: Trigger selection This bit-field selects the trigger input to be used to synchronize the counter. 101: Filtered Timer Input 1 (TI1FP1) 110: Filtered Timer Input 2 (TI2FP2) others: Reserved Note: These bits must be changed only when they are not used (e.g. when SMS=000) to avoid wrong edge detections at the transition. 4 3 read-write ETF ETF[3:0]: External trigger filter This bit-field then defines the frequency used to sample ETRP signal and the length of the digital filter applied to ETRP. The digital filter is made of an event counter in which N events are needed to validate a transition on the output: 0000: No filter, sampling is done at fDTS 0001: fSAMPLING=fCK_INT, N=2 0010: fSAMPLING=fCK_INT, N=4 0011: fSAMPLING=fCK_INT, N=8 0100: fSAMPLING=fDTS/2, N=6 0101: fSAMPLING=fDTS/2, N=8 0110: fSAMPLING=fDTS/4, N=6 0111: fSAMPLING=fDTS/4, N=8 1000: fSAMPLING=fDTS/8, N=6 1001: fSAMPLING=fDTS/8, N=8 1010: fSAMPLING=fDTS/16, N=5 1011: fSAMPLING=fDTS/16, N=6 1100: fSAMPLING=fDTS/16, N=8 1101: fSAMPLING=fDTS/32, N=5 1110: fSAMPLING=fDTS/32, N=6 1111: fSAMPLING=fDTS/32, N=8 8 4 read-write ETF NoFilter No filter, sampling is done at fDTS 0 FCK_INT_N2 fSAMPLING=fCK_INT, N=2 1 FCK_INT_N4 fSAMPLING=fCK_INT, N=4 2 FCK_INT_N8 fSAMPLING=fCK_INT, N=8 3 FDTS_Div2_N6 fSAMPLING=fDTS/2, N=6 4 FDTS_Div2_N8 fSAMPLING=fDTS/2, N=8 5 FDTS_Div4_N6 fSAMPLING=fDTS/4, N=6 6 FDTS_Div4_N8 fSAMPLING=fDTS/4, N=8 7 FDTS_Div8_N6 fSAMPLING=fDTS/8, N=6 8 FDTS_Div8_N8 fSAMPLING=fDTS/8, N=8 9 FDTS_Div16_N5 fSAMPLING=fDTS/16, N=5 10 FDTS_Div16_N6 fSAMPLING=fDTS/16, N=6 11 FDTS_Div16_N8 fSAMPLING=fDTS/16, N=8 12 FDTS_Div32_N5 fSAMPLING=fDTS/32, N=5 13 FDTS_Div32_N6 fSAMPLING=fDTS/32, N=6 14 FDTS_Div32_N8 fSAMPLING=fDTS/32, N=8 15 ETPS ETPS[1:0]: External trigger prescaler External trigger signal ETRP frequency must be at most 1/4 of TIMxCLK frequency. A prescaler can be enabled to reduce ETRP frequency. It is useful when inputting fast external clocks. 00: Prescaler OFF 01: ETRP frequency divided by 2 10: ETRP frequency divided by 4 11: ETRP frequency divided by 8 12 2 read-write ETPS Div1 Prescaler OFF 0 Div2 ETRP frequency divided by 2 1 Div4 ETRP frequency divided by 4 2 Div8 ETRP frequency divided by 8 3 ECE ECE: External clock enable This bit enables External clock mode 2. 0: External clock mode 2 disabled 1: External clock mode 2 enabled. The counter is clocked by any active edge on the ETRF signal. Note: 1: Setting the ECE bit has the same effect as selecting external clock mode 1 with TRGI connected to ETRF (SMS=111 and TS=111). Note: 2: It is possible to simultaneously use external clock mode 2 with the following slave modes: reset mode, gated mode and trigger mode. Nevertheless, TRGI must not be connected to ETRF in this case (TS bits must not be 111). Note: 3: If external clock mode 1 and external clock mode 2 are enabled at the same time, the external clock input is ETRF. 14 1 read-write ECE Disabled External clock mode 2 disabled 0 Enabled External clock mode 2 enabled. The counter is clocked by any active edge on the ETRF signal. 1 ETP ETP: External trigger polarity This bit selects whether ETR or ETR is used for trigger operations 0: ETR is non-inverted, active at high level or rising edge. 1: ETR is inverted, active at low level or falling edge. 15 1 read-write ETP NotInverted ETR is noninverted, active at high level or rising edge 0 Inverted ETR is inverted, active at low level or falling edge 1 SMS_3 SMS[3]: Slave mode selection - bit 3 Refer to SMS description - bits2:0 16 1 read-write DIER DIER DIER register 0xC 0x20 read-write 0x00000000 0x0000000F UIE UIE: Update interrupt enable 0: Update interrupt disabled 1: Update interrupt enabled 0 1 read-write UIE Disabled Update interrupt disabled 0 Enabled Update interrupt enabled 1 4 0x1 1-4 CC%sIE Capture/Compare %s interrupt enable 1 1 read-write CC1IE Disabled CCx interrupt disabled 0 Enabled CCx interrupt enabled 1 COMIE COM interrupt enable 5 1 read-write COMIE Disabled COM interrupt disabled 0 Enabled COM interrupt enabled 1 TIE TIE: Trigger interrupt enable 0: Trigger interrupt disabled 1: Trigger interrupt enabled 6 1 read-write TIE Disabled Trigger interrupt disabled 0 Enabled Trigger interrupt enabled 1 BIE Break interrupt enable. 7 1 read-write BIE Disabled Break interrupt disabled 0 Enabled Break interrupt enabled 1 SR SR SR register 0x10 0x20 read-write 0x00000000 0x0000000F UIF UIF: Update interrupt flag This bit is set by hardware on an update event. It is cleared by software. 0: No update occurred. 1: Update interrupt pending. This bit is set by hardware when the registers are updated: At overflow regarding the repetition counter value (update if repetition counter = 0) and if the UDIS=0 in the TIMx_CR1 register. When CNT is reinitialized by software using the UG bit in TIMx_EGR register, if URS=0 and UDIS=0 in the TIMx_CR1 register. 0 1 read-write zeroToClear UIFR read NoUpdateOccurred No update occurred 0 UpdatePending Update interrupt pending 1 UIFW write Clear Clear flag 0 4 0x1 1-4 CC%sIF Capture/compare %s interrupt flag 1 1 read-write zeroToClear CC1IFR read NoMatch No campture/compare has been detected 0 Match If CC1 is an output: The content of the counter TIMx_CNT matches the content of the TIMx_CCR1 register. If CC1 is an input: The counter value has been captured in TIMx_CCR1 register. 1 CC1IFW write Clear Clear flag 0 COMIF COM interrupt flag. 5 1 read-write zeroToClear COMIFR read NoCOM No COM event occurred 0 COM COM interrupt pending 1 COMIFW write Clear Clear flag 0 TIF TIF: Trigger interrupt flag This flag is set by hardware on trigger event (active edge detected on TRGI input when the slave mode controller is enabled in all modes but gated mode. It is set when the counter starts or stops when gated mode is selected. It is cleared by software.. 0: No trigger event occurred. 1: Trigger interrupt pending. 6 1 read-write zeroToClear TIFR read NoTrigger No trigger event occurred 0 Trigger Trigger interrupt pending 1 TIFW write Clear Clear flag 0 BIF Break interrupt flag. 7 1 read-write zeroToClear BIFR read NoTrigger No break event occurred 0 Trigger An active level has been detected on the break input. An interrupt is generated if BIE=1 in the TIMx_DIER register 1 BIFW write Clear Clear flag 0 B2IF Break 2 interrupt flag. 8 1 read-write zeroToClear B2IFR read NoTrigger No break event occurred 0 Trigger An active level has been detected on the break 2 input. An interrupt is generated if BIE=1 in the TIMx_DIER register 1 B2IFW write Clear Clear flag 0 4 0x1 1-4 CC%sOF Capture/Compare %s overcapture flag 9 1 read-write zeroToClear CC1OFR read NoOvercapture No overcapture has been detected 0 Overcapture The counter value has been captured in TIMx_CCRx register while CCxIF flag was already set 1 CC1OFW write Clear Clear flag 0 CC5IF Compare 5 interrupt flag. 16 1 read-write zeroToClear read write CC6IF Compare 6 interrupt flag. 17 1 read-write zeroToClear read write EGR EGR EGR register 0x14 0x20 read-write 0x00000000 0x0000000F UG UG: Update generation This bit can be set by software, it is automatically cleared by hardware. 0: No action. 1: Reinitialize the counter and generates an update of the registers. Note that the prescaler counter is cleared too (anyway the prescaler ratio is not affected). 0 1 write-only UG Update Re-initializes the timer counter and generates an update of the registers. 1 4 0x1 1-4 CC%sG Capture/compare %s generation 1 1 write-only CC1GW Trigger If CC1 is an output: CC1IF flag is set, Corresponding interrupt or DMA request is sent if enabled. If CC1 is an input: The current value of the counter is captured in TIMx_CCR1 register. 1 COMG Capture/compare control update generation. 5 1 write-only COMGW Trigger When CCPC bit is set, it allows CCxE, CCxNE and OCxM bits to be updated 1 TG TG: Trigger generation This bit is set by software in order to generate an event, it is automatically cleared by hardware. 0: No action 1: The TIF flag is set in TIMx_SR register. Related interrupt can occur if enabled. 6 1 write-only TGW Trigger The TIF flag is set in TIMx_SR register. Related interrupt or DMA transfer can occur if enabled. 1 BG Break generation. 7 1 write-only BGW Trigger A break event is generated. MOE bit is cleared and BIF flag is set. Related interrupt or DMA transfer can occur if enabled 1 B2G Break 2 generation. 8 1 write-only B2GW Trigger A break 2 event is generated. MOE bit is cleared and B2IF flag is set. Related interrupt can occur if enabled 1 CCMR1_Output CCMR1 CCMR1 register 0x18 0x20 read-write 0x00000000 0x0000000F 2 0x8 1-2 CC%sS Capture/Compare %s selection 0 2 read-write CC1S Output CCx channel is configured as output 0 2 0x8 1-2 OC%sFE Output compare %s fast enable 2 1 read-write OC1FE Disabled Fast output disabled 0 Enabled Fast output enabled 1 2 0x8 1-2 OC%sPE Output compare %s preload enable 3 1 read-write OC1PE Disabled Preload register on CCRx disabled. New values written to CCRx are taken into account immediately 0 Enabled Preload register on CCRx enabled. Preload value is loaded into active register on each update event 1 2 0x8 1-2 OC%sM Output compare %s mode 4 3 read-write OC1M Frozen The comparison between the output compare register TIMx_CCRy and the counter TIMx_CNT has no effect on the outputs / OpmMode1: Retriggerable OPM mode 1 - In up-counting mode, the channel is active until a trigger event is detected (on TRGI signal). In down-counting mode, the channel is inactive 0 ActiveOnMatch Set channel to active level on match. OCyREF signal is forced high when the counter matches the capture/compare register / OpmMode2: Inversely to OpmMode1 1 InactiveOnMatch Set channel to inactive level on match. OCyREF signal is forced low when the counter matches the capture/compare register / Reserved 2 Toggle OCyREF toggles when TIMx_CNT=TIMx_CCRy / Reserved 3 ForceInactive OCyREF is forced low / CombinedPwmMode1: OCyREF has the same behavior as in PWM mode 1. OCyREFC is the logical OR between OC1REF and OC2REF 4 ForceActive OCyREF is forced high / CombinedPwmMode2: OCyREF has the same behavior as in PWM mode 2. OCyREFC is the logical AND between OC1REF and OC2REF 5 PwmMode1 In upcounting, channel is active as long as TIMx_CNT<TIMx_CCRy else inactive. In downcounting, channel is inactive as long as TIMx_CNT>TIMx_CCRy else active / AsymmetricPwmMode1: OCyREF has the same behavior as in PWM mode 1. OCyREFC outputs OC1REF when the counter is counting up, OC2REF when it is counting down 6 PwmMode2 Inversely to PwmMode1 / AsymmetricPwmMode2: Inversely to AsymmetricPwmMode1 7 2 0x8 1-2 OC%sCE Output compare %s clear enable 7 1 read-write OC1CE Disabled OCxRef is not affected by the ETRF signal 0 Enabled OCxRef is cleared as soon as a High level is detected on ETRF signal 1 2 0x8 1-2 OC%sM_3 Output compare %s mode, bit 3 16 1 read-write OC1M_3 Normal Normal output compare mode (modes 0-7) 0 Extended Extended output compare mode (modes 7-15) 1 CCMR1_Input CCMR1_in CCMR1 0x18 0x20 read-write 0x00000000 0x0000000F CC1S CC1S: Capture/Compare 1 Selection This bit-field defines the direction of the channel (input/output) as well as the used input. 00: CC1 channel is configured as output 01: CC1 channel is configured as input, IC1 is mapped on TI1 1x: Reserved Note: CC1S bits are writable only when the channel is OFF (CC1E = '0' in TIMx_CCER). 0 2 read-write CC1S TI1 CC1 channel is configured as input, IC1 is mapped on TI1 1 TI2 CC1 channel is configured as input, IC1 is mapped on TI2 2 TRC CC1 channel is configured as input, IC1 is mapped on TRC 3 2 0x8 1-2 IC%sPSC Input capture %s prescaler 2 2 read-write ICPrescaler NoPrescaler No prescaler, capture is done each time an edge is detected on the capture input 0 TwoEvents Capture is done once every 2 events 1 FourEvents Capture is done once every 4 events 2 EightEvents Capture is done once every 8 events 3 2 0x8 1-2 IC%sF Input capture %s filter 4 4 read-write ICFilter NoFilter No filter, sampling is done at fDTS 0 FCK_INT_N2 fSAMPLING=fCK_INT, N=2 1 FCK_INT_N4 fSAMPLING=fCK_INT, N=4 2 FCK_INT_N8 fSAMPLING=fCK_INT, N=8 3 FDTS_Div2_N6 fSAMPLING=fDTS/2, N=6 4 FDTS_Div2_N8 fSAMPLING=fDTS/2, N=8 5 FDTS_Div4_N6 fSAMPLING=fDTS/4, N=6 6 FDTS_Div4_N8 fSAMPLING=fDTS/4, N=8 7 FDTS_Div8_N6 fSAMPLING=fDTS/8, N=6 8 FDTS_Div8_N8 fSAMPLING=fDTS/8, N=8 9 FDTS_Div16_N5 fSAMPLING=fDTS/16, N=5 10 FDTS_Div16_N6 fSAMPLING=fDTS/16, N=6 11 FDTS_Div16_N8 fSAMPLING=fDTS/16, N=8 12 FDTS_Div32_N5 fSAMPLING=fDTS/32, N=5 13 FDTS_Div32_N6 fSAMPLING=fDTS/32, N=6 14 FDTS_Div32_N8 fSAMPLING=fDTS/32, N=8 15 CC2S CC2S: Capture/Compare 2 selection This bit-field defines the direction of the channel (input/output) as well as the used input. 00: CC2 channel is configured as output 01: CC2 channel is configured as input, IC2 is mapped on TI2 10: CC2 channel is configured as input, IC2 is mapped on TI1 11: CC2 channel is configured as input, IC2 is mapped on TRC. This mode is working only if an internal trigger input is selected through TS bit (TIMx_SMCR register) Note: CC2S bits are writable only when the channel is OFF (CC2E = '0' in TIMx_CCER). 8 2 read-write CC2S TI2 CC2 channel is configured as input, IC2 is mapped on TI2 1 TI1 CC2 channel is configured as input, IC2 is mapped on TI1 2 TRC CC2 channel is configured as input, IC2 is mapped on TRC 3 CCMR2_Output CCMR2 CCMR2 register 0x1C 0x20 read-write 0x00000000 0x0000000F 2 0x8 3-4 CC%sS Capture/Compare %s selection 0 2 read-write 2 0x8 3-4 OC%sFE Output compare %s fast enable 2 1 read-write 2 0x8 3-4 OC%sPE Output compare %s preload enable 3 1 read-write 2 0x8 3-4 OC%sM Output compare %s mode 4 3 read-write 2 0x8 3-4 OC%sCE Output compare %s clear enable 7 1 read-write 2 0x8 3-4 OC%sM_3 Output compare %s mode, bit 3 16 1 read-write CCMR2_Input CCMR2_in CCMR2 0x1C 0x20 read-write 0x00000000 0x0000000F CC3S CC3S: Capture/compare 3 selection This bit-field defines the direction of the channel (input/output) as well as the used input. 00: CC3 channel is configured as output 01: CC3 channel is configured as input, IC3 is mapped on TI3 10: CC3 channel is configured as input, IC3 is mapped on TI4 11: CC3 channel is configured as input, IC3 is mapped on TRC. This mode is working only if an internal trigger input is selected through TS bit (TIMx_SMCR register) Note: CC3S bits are writable only when the channel is OFF (CC3E = '0' in TIMx_CCER). 0 2 read-write CC3S TI3 CC3 channel is configured as input, IC3 is mapped on TI3 1 TI4 CC3 channel is configured as input, IC3 is mapped on TI4 2 TRC CC3 channel is configured as input, IC3 is mapped on TRC 3 2 0x8 3-4 IC%sPSC Input capture %s prescaler 2 2 read-write 2 0x8 3-4 IC%sF Input capture %s filter 4 4 read-write CC4S CC4S: Capture/Compare 4 selection This bit-field defines the direction of the channel (input/output) as well as the used input. 00: CC4 channel is configured as output 01: CC4 channel is configured as input, IC4 is mapped on TI4 10: CC4 channel is configured as input, IC4 is mapped on TI3 11: CC4 channel is configured as input, IC4 is mapped on TRC. This mode is working only if an internal trigger input is selected through TS bit (TIMx_SMCR register) Note: CC4S bits are writable only when the channel is OFF (CC4E = '0' in TIMx_CCER). 8 2 read-write CC4S TI4 CC4 channel is configured as input, IC4 is mapped on TI4 1 TI3 CC4 channel is configured as input, IC4 is mapped on TI3 2 TRC CC4 channel is configured as input, IC4 is mapped on TRC 3 CCER CCER CCER register 0x20 0x20 read-write 0x00000000 0x0000000F 6 0x4 1-6 CC%sE Capture/Compare %s output enable 0 1 read-write CC1E Disabled Capture disabled 0 Enabled Capture enabled 1 6 0x4 1-6 CC%sP Capture/Compare %s output Polarity 1 1 read-write CC1P RisingEdge Noninverted/rising edge 0 FallingEdge Inverted/falling edge 1 4 0x4 1-4 CC%sNE Capture/Compare %s complementary output enable 2 1 read-write CC1NE Disabled Complementary output disabled 0 Enabled Complementary output enabled 1 4 0x4 1-4 CC%sNP Capture/Compare %s output Polarity 3 1 read-write CC1NP ActiveHigh OCxN active high 0 ActiveLow OCxN active low 1 CNT CNT CNT register 0x24 0x20 read-write 0x00000000 0x0000000F CNT CNT[15:0]: Counter value 0 16 read-write 0 65535 UIFCPY UIFCPY: UIF Copy This bit is a read-only copy of the UIF bit of the TIMx_ISR register. If the UIFREMAP bit in TIMx_CR1 is reset, bit 31 is reserved and read as 0. 31 1 read-only PSC PSC PSC register 0x28 0x20 read-write 0x00000000 0x0000000F PSC PSC[15:0]: Prescaler value The counter clock frequency (CK_CNT) is equal to fCK_PSC / (PSC[15:0] + 1). PSC contains the value to be loaded in the active prescaler register at each update event (including when the counter is cleared through UG bit of TIMx_EGR register or through trigger controller when configured in 'reset mode'). 0 16 read-write 0 65535 ARR ARR ARR register 0x2C 0x20 read-write 0x0000FFFF 0x0000FFFF ARR ARR[15:0]: Prescaler value ARR is the value to be loaded in the actual auto-reload register. Refer to the Section 22.3.1: Time-base unit on page 418 for more details about ARR update and behavior. The counter is blocked while the auto-reload value is null. 0 16 read-write 0 65535 RCR RCR RCR register 0x30 0x20 read-write 0x00000000 0x0000000F REP REP[7:0]: Repetition counter value These bits allow the user to set-up the update rate of the compare registers (i.e. periodic transfers from preload to active registers) when preload registers are enable, as well as the update interrupt generation rate, if this interrupt is enable. Each time the REP_CNT related downcounter reaches zero, an update event is generated and it restarts counting from REP value. As REP_CNT is reloaded with REP value only at the repetition update event U_RC, any write to the TIMx_RCR register is not taken in account until the next repetition update event. It means in PWM mode (REP+1) corresponds to the number of PWM periods in edge-aligned mode. 0 16 read-write 0 65535 4 0x4 1-4 CCR%s CCR%s capture/compare register 0x34 0x20 read-write 0x00000000 0x0000000F CCR Capture/Compare value 0 16 read-write 0 65535 BDTR BDTR BDTR register 0x44 0x20 read-write 0x00000000 0x0000000F DTG Deadtime generator setup. 0 8 read-write 0 255 LOCK Lock configuration. 8 2 read-write LOCK Off No bit is write protected 0 Level1 Any bits except MOE, OSSR, OSSI and LOCK in TIMx_BDTR register, OISx and OISxN bits in TIMx_CR2 register can no longer be written 1 Level2 LOCK Level 1 + CC Polarity bits (CCxP/CCxNP bits in TIMx_CCER register, as long as the related channel is configured in output through the CCxS bits) as well as OSSR and OSSI bits can no longer be written 2 Level3 LOCK Level 2 + CC Control bits (OCxM and OCxPE bits in TIMx_CCMRx registers, as long as the related channel is configured in output through the CCxS bits) can no longer be written 3 OSSI Off-state selection for Idle mode. 10 1 read-write OSSI HiZ When inactive, OC/OCN outputs are disabled 0 IdleLevel When inactive, OC/OCN outputs are forced to idle level 1 OSSR Off-state selection for Run mode. 11 1 read-write OSSR HiZ When inactive, OC/OCN outputs are disabled 0 IdleLevel When inactive, OC/OCN outputs are enabled with their inactive level 1 BKE Break enable. 12 1 read-write BKE Disabled Break function x disabled 0 Enabled Break function x enabled 1 BKP Break polarity. 13 1 read-write BKP ActiveLow Break input BRKx is active low 0 ActiveHigh Break input BRKx is active high 1 AOE Automatic output enable. 14 1 read-write AOE Manual MOE can be set only by software 0 Automatic MOE can be set by software or automatically at the next update event (if none of the break inputs BRK and BRK2 is active) 1 MOE Main output enable. 15 1 read-write MOE DisabledIdle OC/OCN are disabled or forced idle depending on OSSI 0 Enabled OC/OCN are enabled if CCxE/CCxNE are set 1 BKF Break filter. 16 4 read-write BK2F Break 2 filter. 20 4 read-write BK2E Break 2 enable. 24 1 read-write BK2P Break 2 polarity. 25 1 read-write CCMR3_Output CCMR3 CCMR3 register 0x54 0x20 read-write 0x00000000 0x0000000F 2 0x8 5-6 OC%sFE Output compare %s fast enable 2 1 read-write 2 0x8 5-6 OC%sPE Output compare %s preload enable 3 1 read-write 2 0x8 5-6 OC%sM Output compare %s mode 4 3 read-write 2 0x8 5-6 OC%sCE Output compare %s clear enable 7 1 read-write 2 0x8 5-6 OC%sM_3 Output compare %s mode, bit 3 16 1 read-write CCMR3_Input CCMR3_in CCMR3 0x54 0x20 read-write 0x00000000 0x0000000F 2 0x8 5-6 IC%sPSC Input capture %s prescaler 2 2 read-write ICPrescaler NoPrescaler No prescaler, capture is done each time an edge is detected on the capture input 0 TwoEvents Capture is done once every 2 events 1 FourEvents Capture is done once every 4 events 2 EightEvents Capture is done once every 8 events 3 2 0x8 5-6 IC%sF Input capture %s filter 4 4 read-write ICFilter NoFilter No filter, sampling is done at fDTS 0 FCK_INT_N2 fSAMPLING=fCK_INT, N=2 1 FCK_INT_N4 fSAMPLING=fCK_INT, N=4 2 FCK_INT_N8 fSAMPLING=fCK_INT, N=8 3 FDTS_Div2_N6 fSAMPLING=fDTS/2, N=6 4 FDTS_Div2_N8 fSAMPLING=fDTS/2, N=8 5 FDTS_Div4_N6 fSAMPLING=fDTS/4, N=6 6 FDTS_Div4_N8 fSAMPLING=fDTS/4, N=8 7 FDTS_Div8_N6 fSAMPLING=fDTS/8, N=6 8 FDTS_Div8_N8 fSAMPLING=fDTS/8, N=8 9 FDTS_Div16_N5 fSAMPLING=fDTS/16, N=5 10 FDTS_Div16_N6 fSAMPLING=fDTS/16, N=6 11 FDTS_Div16_N8 fSAMPLING=fDTS/16, N=8 12 FDTS_Div32_N5 fSAMPLING=fDTS/32, N=5 13 FDTS_Div32_N6 fSAMPLING=fDTS/32, N=6 14 FDTS_Div32_N8 fSAMPLING=fDTS/32, N=8 15 CCR5 CCR5 capture/compare register 0x58 0x20 read-write 0x00000000 0x0000000F CCR Capture/Compare value 0 16 read-write 0 65535 GC5C1 Group channel 5 and channel 1 distortion on channel 1 output: 0: No effect of OC5REF on OC1REFC5 1: OC1REFC is the logical AND of OC1REFC and OC5REF This bit can either have immediate effect or be preloaded and taken into account after an update event (if preload feature is selected in TIMxCCMR1). Note: It is also possible to apply this distortion on combined PWM signals. 29 1 read-write GC5C2 Group channel 5 and channel 2 distortion on channel 2 output: 0: No effect of OC5REF on OC2REFC 1: OC2REFC is the logical AND of OC2REFC and OC5REF This bit can either have immediate effect or be preloaded and taken into account after an update event (if preload feature is selected in TIMxCCMR1). Note: It is also possible to apply this distortion on combined PWM signals. 30 1 read-write GC5C3 Group channel 5 and channel 3 distortion on channel 3 output: 0: No effect of OC5REF on OC3REFC 1: OC3REFC is the logical AND of OC3REFC and OC5REF This bit can either have immediate effect or be preloaded and taken into account after an update event (if preload feature is selected in TIMxCCMR2). Note: It is also possible to apply this distortion on combined PWM signals. 31 1 read-write CCR6 CCR6 capture/compare register 0x5C 0x20 read-write 0x00000000 0x0000000F CCR Capture/Compare value 0 16 read-write 0 65535 AF1 AF1 AF1 register 0x60 0x20 read-write 0x00000001 0x0000000F BKINE BRK BKIN input enable 0 1 read-write BKCMP1E BRK COMP1 enable 1 1 read-write BKCMP2E BRK COMP2 enable 2 1 read-write BKINP BRK BKIN input polarity 9 1 read-write BKCMP1P BRK COMP1 input polarity 10 1 read-write BKCMP2P BRK COMP2 input polarity 11 1 read-write AF2 AF2 AF2 register 0x64 0x20 read-write 0x00000001 0x0000000F BK2INE BRK2 BKIN input enable. 0 1 read-write BK2CMP1E BRK2 COMP1 enable. 1 1 read-write BK2CMP2E BRK2 COMP2 enable. 2 1 read-write BK2INP BRK2 BKIN2 input polarity 9 1 read-write BK2CMP1P BRK2 COMP1 input polarity. 10 1 read-write BK2CMP2P BRK2 COMP2 input polarity. 11 1 read-write SYSTEM_CTRL SYSTEM_CTRL 0x40000000 0x0 0x40 registers DIE_ID DIE_ID DIE_ID register 0x0 0x20 read-only 0x00000120 REVISION Cut revision (metal fix) 0 4 read-only VERSION Cut version 4 4 read-only PRODUCT Product version. May be used to discriminate several version of a same digital BLE LPH device embedding different analog versions 8 4 read-only JTAG_ID JTAG_ID JTAG_ID register 0x4 0x20 read-only 0x0201E041 MANUF_ID Manufacturer ID 1 11 read-only PART_NUMBER Part number 12 16 read-only VERSION_NUMBER Version 28 4 read-only I2C_FMP_CTRL I2C_FMP_CTRL I2C_FMP_CTRL register 0x8 0x20 read-write 0x00000000 I2C1_PA0_FMP I2C1 Fast-Mode Plus driving capability for I2C1_SCL on PA0 I/O. 0: PA0 pin operated in standard mode. 1: FM+ mode is enabled on PA0 pin, and speed control is bypassed 0 1 read-write I2C1_PA1_FMP I2C1 Fast-Mode Plus driving capability for I2C1_SDA on PA1 I/O. 0: PA1 pin operated in standard mode. 1: FM+ mode is enabled on PA1 pin, and speed control is bypassed 1 1 read-write I2C1_PB6_FMP I2C1 Fast-Mode Plus driving capability for I2C1_SCL on PB6 I/O. 0: PB6 pin operated in standard mode. 1: FM+ mode is enabled on PB6 pin, and speed control is bypassed. 2 1 read-write I2C1_PB7_FMP I2C1 Fast-Mode Plus driving capability for I2C1_SDA on PB7 I/O. 0: PB7 pin operated in standard mode. 1: FM+ mode is enabled on PB7 pin, and speed control is bypassed 3 1 read-write IO_DTR IO_DTR IO_DTR register 0xC 0x20 read-write 0x00000000 PA0_DT PA0_DT: Interrupt Detection Type for port A I/Os. 0: edge detection. 1: level detection. 0 1 read-write PA1_DT PA1_DT: Interrupt Detection Type for port A I/Os. 0: edge detection. 1: level detection. 1 1 read-write PA2_DT PA2_DT: Interrupt Detection Type for port A I/Os. 0: edge detection. 1: level detection. 2 1 read-write PA3_DT PA3_DT: Interrupt Detection Type for port A I/Os. 0: edge detection. 1: level detection. 3 1 read-write PA4_DT PA4_DT:Interrupt Detection Type for port A I/Os. 4 1 read-write PA5_DT PA5_DT:Interrupt Detection Type for port A I/Os. 5 1 read-write PA6_DT PA6_DT:Interrupt Detection Type for port A I/Os. 6 1 read-write PA7_DT PA7_DT:Interrupt Detection Type for port A I/Os. 7 1 read-write PA8_DT PA8_DT: Interrupt Detection Type for port A I/Os. 0: edge detection. 1: level detection. 8 1 read-write PA9_DT PA9_DT: Interrupt Detection Type for port A I/Os. 0: edge detection. 1: level detection. 9 1 read-write PA10_DT PA10_DT: Interrupt Detection Type for port A I/Os. 0: edge detection. 1: level detection. 10 1 read-write PA11_DT PA11_DT: Interrupt Detection Type for port A I/Os. 0: edge detection. 1: level detection. 11 1 read-write PB0_DT PB0_DT: Interrupt Detection Type for port B I/Os. 0: edge detection. 1: level detection. 16 1 read-write PB1_DT PB1_DT: Interrupt Detection Type for port B I/Os. 0: edge detection. 1: level detection. 17 1 read-write PB2_DT PB2_DT: Interrupt Detection Type for port B I/Os. 0: edge detection. 1: level detection. 18 1 read-write PB3_DT PB3_DT: Interrupt Detection Type for port B I/Os. 0: edge detection. 1: level detection. 19 1 read-write PB4_DT PB4_DT: Interrupt Detection Type for port B I/Os. 0: edge detection. 1: level detection. 20 1 read-write PB5_DT PB5_DT: Interrupt Detection Type for port B I/Os. 0: edge detection. 1: level detection. 21 1 read-write PB6_DT PB6_DT: Interrupt Detection Type for port B I/Os. 0: edge detection. 1: level detection. 22 1 read-write PB7_DT PB7_DT: Interrupt Detection Type for port B I/Os. 0: edge detection. 1: level detection. 23 1 read-write PB8_DT PB8_DT:Interrupt Detection Type for port B I/Os. 24 1 read-write PB9_DT PB9_DT:Interrupt Detection Type for port B I/Os. 25 1 read-write PB10_DT PB10_DT:Interrupt Detection Type for port B I/Os. 26 1 read-write PB11_DT PB11_DT:Interrupt Detection Type for port B I/Os. 27 1 read-write PB12_DT PB12_DT: Interrupt Detection Type for port B I/Os. 0: edge detection. 1: level detection. 28 1 read-write PB13_DT PB13_DT: Interrupt Detection Type for port B I/Os. 0: edge detection. 1: level detection. 29 1 read-write PB14_DT PB14_DT: Interrupt Detection Type for port B I/Os. 0: edge detection. 1: level detection. 30 1 read-write PB15_DT PB15_DT: Interrupt Detection Type for port B I/Os. 0: edge detection. 1: level detection. 31 1 read-write IO_IBER IO_IBER IO_IBER register 0x10 0x20 read-write 0x00000000 PA0_IBE PA0_IBE: Interrupt edge selection for Port A I/Os. 0: single edge detection. 1: both edges detection 0 1 read-write PA1_IBE PA1_IBE: Interrupt edge selection for Port A I/Os. 0: single edge detection. 1: both edges detection 1 1 read-write PA2_IBE PA2_IBE: Interrupt edge selection for Port A I/Os. 0: single edge detection. 1: both edges detection 2 1 read-write PA3_IBE PA3_IBE: Interrupt edge selection for Port A I/Os. 0: single edge detection. 1: both edges detection 3 1 read-write PA4_IBE PA4_IBE: Interrupt edge selection for Port A I/Os. 4 1 read-write PA5_IBE PA5_IBE: Interrupt edge selection for Port A I/Os. 5 1 read-write PA6_IBE PA6_IBE: Interrupt edge selection for Port A I/Os. 6 1 read-write PA7_IBE PA7_IBE: Interrupt edge selection for Port A I/Os. 7 1 read-write PA8_IBE PA8_IBE: Interrupt edge selection for Port A I/Os. 0: single edge detection. 1: both edges detection 8 1 read-write PA9_IBE PA9_IBE: Interrupt edge selection for Port A I/Os. 0: single edge detection. 1: both edges detection 9 1 read-write PA10_IBE PA10_IBE: Interrupt edge selection for Port A I/Os. 0: single edge detection. 1: both edges detection 10 1 read-write PA11_IBE PA11_IBE: Interrupt edge selection for Port A I/Os. 0: single edge detection. 1: both edges detection 11 1 read-write PA12_IBE PA12_IBE: Interrupt edge selection for Port A I/Os. 12 1 read-write PA13_IBE PA13_IBE: Interrupt edge selection for Port A I/Os. 13 1 read-write PA14_IBE PA14_IBE: Interrupt edge selection for Port A I/Os. 14 1 read-write PA15_IBE PA15_IBE: Interrupt edge selection for Port A I/Os. 15 1 read-write PB0_IBE PB0_IBE: Interrupt edge selection for port B I/Os. 16 1 read-write PB1_IBE PB1_IBE: Interrupt edge selection for port B I/Os. 17 1 read-write PB2_IBE PB2_IBE: Interrupt edge selection for port B I/Os. 18 1 read-write PB3_IBE PB3_IBE: Interrupt edge selection for port B I/Os. 19 1 read-write PB4_IBE PB4_IBE: Interrupt edge selection for port B I/Os. 20 1 read-write PB5_IBE PB5_IBE: Interrupt edge selection for port B I/Os. 21 1 read-write PB6_IBE PB6_IBE: Interrupt edge selection for port B I/Os. 22 1 read-write PB7_IBE PB7_IBE: Interrupt edge selection for port B I/Os. 23 1 read-write PB8_IBE PB8_IBE: Interrupt edge selection for port B I/Os. 24 1 read-write PB9_IBE PB9_IBE: Interrupt edge selection for port B I/Os. 25 1 read-write PB10_IBE PB10_IBE: Interrupt edge selection for port B I/Os. 26 1 read-write PB11_IBE PB11_IBE: Interrupt edge selection for port B I/Os. 27 1 read-write PB12_IBE PB12_IBE: Interrupt edge selection for port B I/Os. 0: single edge detection. 1: both edges detection. 28 1 read-write PB13_IBE PB13_IBE: Interrupt edge selection for port B I/Os. 0: single edge detection. 1: both edges detection. 29 1 read-write PB14_IBE PB14_IBE: Interrupt edge selection for port B I/Os. 0: single edge detection. 1: both edges detection. 30 1 read-write PB15_IBE PB15_IBE: Interrupt edge selection for port B I/Os. 0: single edge detection. 1: both edges detection. 31 1 read-write IO_IEVR IO_IEVR IO_IEVR register 0x14 0x20 read-write 0x00000000 PA0_IEV PA0_IEV : Interrupt polarity event for Port A I/Os. 0: falling edge / low level. 1: rising edge / high level. 0 1 read-write PA1_IEV PA1_IEV : Interrupt polarity event for Port A I/Os. 0: falling edge / low level. 1: rising edge / high level. 1 1 read-write PA2_IEV PA2_IEV : Interrupt polarity event for Port A I/Os. 0: falling edge / low level. 1: rising edge / high level. 2 1 read-write PA3_IEV PA3_IEV : Interrupt polarity event for Port A I/Os. 0: falling edge / low level. 1: rising edge / high level. 3 1 read-write PA4_IEV PA4_IEV : Interrupt polarity event for Port A I/Os. 4 1 read-write PA5_IEV PA5_IEV : Interrupt polarity event for Port A I/Os. 5 1 read-write PA6_IEV PA6_IEV : Interrupt polarity event for Port A I/Os. 6 1 read-write PA7_IEV PA7_IEV : Interrupt polarity event for Port A I/Os. 7 1 read-write PA8_IEV PA8_IEV : Interrupt polarity event for Port A I/Os. 0: falling edge / low level. 1: rising edge / high level. 8 1 read-write PA9_IEV PA9_IEV : Interrupt polarity event for Port A I/Os. 0: falling edge / low level. 1: rising edge / high level. 9 1 read-write PA10_IEV PA10_IEV : Interrupt polarity event for Port A I/Os. 0: falling edge / low level. 1: rising edge / high level. 10 1 read-write PA11_IEV PA11_IEV : Interrupt polarity event for Port A I/Os. 0: falling edge / low level. 1: rising edge / high level. 11 1 read-write PA12_IEV PA12_IEV : Interrupt polarity event for Port A I/Os. 12 1 read-write PA13_IEV PA13_IEV : Interrupt polarity event for Port A I/Os. 13 1 read-write PA14_IEV PA14_IEV : Interrupt polarity event for Port A I/Os. 14 1 read-write PA15_IEV PA15_IEV : Interrupt polarity event for Port A I/Os. 15 1 read-write PB0_IEV PB0_IEV : Interrupt polarity event for Port B I/Os. 0: falling edge / low level. 1: rising edge / high level. 16 1 read-write PB1_IEV PB1_IEV : Interrupt polarity event for Port B I/Os. 0: falling edge / low level. 1: rising edge / high level. 17 1 read-write PB2_IEV PB2_IEV : Interrupt polarity event for Port B I/Os. 0: falling edge / low level. 1: rising edge / high level. 18 1 read-write PB3_IEV PB3_IEV : Interrupt polarity event for Port B I/Os. 0: falling edge / low level. 1: rising edge / high level. 19 1 read-write PB4_IEV PB4_IEV : Interrupt polarity event for Port B I/Os. 0: falling edge / low level. 1: rising edge / high level. 20 1 read-write PB5_IEV PB5_IEV : Interrupt polarity event for Port B I/Os. 0: falling edge / low level. 1: rising edge / high level. 21 1 read-write PB6_IEV PB6_IEV : Interrupt polarity event for Port B I/Os. 0: falling edge / low level. 1: rising edge / high level. 22 1 read-write PB7_IEV PB7_IEV : Interrupt polarity event for Port B I/Os. 0: falling edge / low level. 1: rising edge / high level. 23 1 read-write PB8_IEV PB8_IEV : Interrupt polarity event for Port B I/Os. 24 1 read-write PB9_IEV PB9_IEV : Interrupt polarity event for Port B I/Os. 25 1 read-write PB10_IEV PB10_IEV : Interrupt polarity event for Port B I/Os. 26 1 read-write PB11_IEV PB11_IEV : Interrupt polarity event for Port B I/Os. 27 1 read-write PB12_IEV PB12_IEV : Interrupt polarity event for Port B I/Os. 0: falling edge / low level. 1: rising edge / high level. 28 1 read-write PB13_IEV PB13_IEV : Interrupt polarity event for Port B I/Os. 0: falling edge / low level. 1: rising edge / high level. 29 1 read-write PB14_IEV PB14_IEV : Interrupt polarity event for Port B I/Os. 0: falling edge / low level. 1: rising edge / high level. 30 1 read-write PB15_IEV PB15_IEV : Interrupt polarity event for Port B I/Os. 0: falling edge / low level. 1: rising edge / high level. 31 1 read-write IO_IER IO_IER IO_IER register 0x18 0x20 read-write 0x00000000 PA0_IE PA0_IE: Interrupt enable for port A I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 0 1 read-write PA1_IE PA1_IE: Interrupt enable for port A I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 1 1 read-write PA2_IE PA2_IE: Interrupt enable for port A I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 2 1 read-write PA3_IE PA3_IE: Interrupt enable for port A I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 3 1 read-write PA4_IE PA4_IE: Interrupt enable for port A I/Os. 4 1 read-write PA5_IE PA5_IE: Interrupt enable for port A I/Os. 5 1 read-write PA6_IE PA6_IE: Interrupt enable for port A I/Os. 6 1 read-write PA7_IE PA7_IE: Interrupt enable for port A I/Os. 7 1 read-write PA8_IE PA8_IE: Interrupt enable for port A I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 8 1 read-write PA9_IE PA9_IE: Interrupt enable for port A I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 9 1 read-write PA10_IE PA10_IE: Interrupt enable for port A I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 10 1 read-write PA11_IE PA11_IE: Interrupt enable for port A I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 11 1 read-write PA12_IE PA12_IE: Interrupt enable for port A I/Os. 12 1 read-write PA13_IE PA13_IE: Interrupt enable for port A I/Os. 13 1 read-write PA14_IE PA14_IE: Interrupt enable for port A I/Os. 14 1 read-write PA15_IE PA15_IE: Interrupt enable for port A I/Os. 15 1 read-write PB0_IE PB0_IE: Interrupt enable for port B I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 16 1 read-write PB1_IE PB1_IE: Interrupt enable for port B I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 17 1 read-write PB2_IE PB2_IE: Interrupt enable for port B I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 18 1 read-write PB3_IE PB3_IE: Interrupt enable for port B I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 19 1 read-write PB4_IE PB4_IE: Interrupt enable for port B I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 20 1 read-write PB5_IE PB5_IE: Interrupt enable for port B I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 21 1 read-write PB6_IE PB6_IE: Interrupt enable for port B I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 22 1 read-write PB7_IE PB7_IE: Interrupt enable for port B I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 23 1 read-write PB8_IE PB8_IE: Interrupt enable for port B I/Os. 24 1 read-write PB9_IE PB9_IE: Interrupt enable for port B I/Os. 25 1 read-write PB10_IE PB10_IE: Interrupt enable for port B I/Os. 26 1 read-write PB11_IE PB11_IE: Interrupt enable for port B I/Os. 27 1 read-write PB12_IE PB12_IE: Interrupt enable for port B I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 28 1 read-write PB13_IE PB13_IE: Interrupt enable for port B I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 29 1 read-write PB14_IE PB14_IE: Interrupt enable for port B I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 30 1 read-write PB15_IE PB15_IE: Interrupt enable for port B I/Os. 0: interrupt is disabled. 1: interrupt is enabled. 31 1 read-write IO_ISCR IO_ISCR IO_ISCR register 0x1C 0x20 read-write 0x00000000 PA0_ISC PA0_ISC: Interrupt status (before mask) for port a I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 0 1 read-write PA1_ISC PA1_ISC: Interrupt status (before mask) for port a I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 1 1 read-write PA2_ISC PA2_ISC: Interrupt status (before mask) for port a I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 2 1 read-write PA3_ISC PA3_ISC: Interrupt status (before mask) for port a I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 3 1 read-write PA4_ISC PA4_ISC: Interrupt status (before mask) for port a I/Os.. 4 1 read-write PA5_ISC PA5_ISC: Interrupt status (before mask) for port a I/Os.. 5 1 read-write PA6_ISC PA6_ISC: Interrupt status (before mask) for port a I/Os.. 6 1 read-write PA7_ISC PA7_ISC: Interrupt status (before mask) for port a I/Os.. 7 1 read-write PA8_ISC PA8_ISC: Interrupt status (before mask) for port a I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 8 1 read-write PA9_ISC PA9_ISC: Interrupt status (before mask) for port a I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 9 1 read-write PA10_ISC PA10_ISC: Interrupt status (before mask) for port a I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 10 1 read-write PA11_ISC PA11_ISC: Interrupt status (before mask) for port a I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 11 1 read-write PA12_ISC PA12_ISC: Interrupt status (before mask) for port a I/Os. 12 1 read-write PA13_ISC PA13_ISC: Interrupt status (before mask) for port a I/Os. 13 1 read-write PA14_ISC PA14_ISC: Interrupt status (before mask) for port a I/Os. 14 1 read-write PA15_ISC PA15_ISC: Interrupt status (before mask) for port a I/Os. 15 1 read-write PB0_ISC PB0_ISC: Interrupt status (before mask) for port B I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 16 1 read-write PB1_ISC PB1_ISC: Interrupt status (before mask) for port B I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 17 1 read-write PB2_ISC PB2_ISC: Interrupt status (before mask) for port B I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 18 1 read-write PB3_ISC PB3_ISC: Interrupt status (before mask) for port B I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 19 1 read-write PB4_ISC PB4_ISC: Interrupt status (before mask) for port B I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 20 1 read-write PB5_ISC PB5_ISC: Interrupt status (before mask) for port B I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 21 1 read-write PB6_ISC PB6_ISC: Interrupt status (before mask) for port B I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 22 1 read-write PB7_ISC PB7_ISC: Interrupt status (before mask) for port B I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 23 1 read-write PB8_ISC PB8_ISC: Interrupt status (before mask) for port B I/Os.. 24 1 read-write PB9_ISC PB9_ISC: Interrupt status (before mask) for port B I/Os.. 25 1 read-write PB10_ISC PB10_ISC: Interrupt status (before mask) for port B I/Os.. 26 1 read-write PB11_ISC PB11_ISC: Interrupt status (before mask) for port B I/Os.. 27 1 read-write PB12_ISC PB12_ISC: Interrupt status (before mask) for port B I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 28 1 read-write PB13_ISC PB13_ISC: Interrupt status (before mask) for port B I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 29 1 read-write PB14_ISC PB14_ISC: Interrupt status (before mask) for port B I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 30 1 read-write PB15_ISC PB15_ISC: Interrupt status (before mask) for port B I/Os. 0: no pending interrupt. 1: event occurred on corresponding I/O / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 31 1 read-write PWRC_IER PWRC_IER PWRC_IER register 0x20 0x20 read-write 0x00000000 PVD_IE PVD_IE: Programmable Voltage Detector interrupt enable. 0: PVD interrupt is disabled. 1: PVD interrupt is enabled. 1 1 read-write WKUP_IE WKUP_IE: Power Controller Wakeup event interrupt enable. 0: Interrupt on wakeup event seen by the PWRC is disabled. 1: Interrupt on wakeup event seen by the PWRC is enabled. 2 1 read-write PWRC_ISCR PWRC_ISCR PWRC_ISCR register 0x24 0x20 read-write 0x00000000 PVD_ISC PVD_ISC: Programmable Voltage Detector status. 0: no pending interrupt. 1: voltage went under programmed threshold / interrupt occurred (if enabled). Cleared by writing 1 in the bit. 1 1 read-write WKUP_ISC WKUP_ISC: Indicates the Power Controller receives a Wakeup event. 0: no pending interrupt. 1: Wakeup event on PWRC occurred / interrupt occurred (if enabled). Cleared by writing 1 in the bit. This flag will be read at 1 if a wakeup event arrives so close to the low power mode entry requests that the PWRC aborts before shutting down the system. 2 1 read-write BLERXTX_DTR BLERXTX_DTR BLERXTX_DTR register 0x2C 0x20 read-write 0x00000000 TX_DT TX_DT: detection type on TX_SEQUENCE signal: 0: detection on edge (default). 1: detection on level 0 1 read-write RX_DT RX_DT: detection type on RX_SEQUENCE signal: 0: detection on edge (default). 1: detection on level 1 1 read-write BLERXTX_IBER BLERXTX_IBER BLERXTX_IBER register 0x30 0x20 read-write 0x00000000 TX_IBE TX_IBE: interrupt edge register on TX_SEQUENCE signal: 0: detection on single edge (default). 1: detection on both edges 0 1 read-write RX_IBE RX_IBE: interrupt edge register on RX_SEQUENCE signal: 0: detection on single edge (default). 1: detection on both edges 1 1 read-write BLERXTX_IEVR BLERXTX_IEVR BLERXTX_IEVR register 0x34 0x20 read-write 0x00000000 TX_IEV TX_IEV: interrupt polarity event on TX_SEQUENCE signal: 0: detection on falling edge / low level (default). 1: detection on rising edge / high level 0 1 read-write RX_IEV RX_IEV: interrupt polarity event on RX_SEQUENCE signal: 0: detection on falling edge / low level (default). 1: detection on rising edge / high level 1 1 read-write BLERXTX_IER BLERXTX_IER BLERXTX_IER register 0x38 0x20 read-write 0x00000000 TX_IE TX_IE: interrupt enable on TX_SEQUENCE signal: 0: TX_SEQUENCE interrupt is disabled (default). 1: TX_SEQUENCE interrupt is enabled 0 1 read-write RX_IE RX_IE: interrupt enable on RX_SEQUENCE signal: 0: RX_SEQUENCE interrupt is disabled (default). 1: RX_SEQUENCE interrupt is enabled 1 1 read-write BLERXTX_ISCR BLERXTX_ISCR BLERXTX_ISCR register 0x3C 0x8 read-write 0x00000000 TX_ISC TX_ISC:interrupt status on TX_SEQUENCE signal (can be a rising or a falling edge depending on BLERXTX_IEVR and BLERXTX_IBER): 0: no activity on TX_SEQUENCE detected. 1: activity on TX_SEQUENCE occurred 0 1 read-write RX_ISC RX_ISC: interrupt status on RX_SEQUENCE signal (can be a rising or a falling edge depending on BLERXTX_IEVR and BLERXTX_IBER): 0: no activity on RX_SEQUENCE detected. 1: activity on RX_SEQUENCE occurred 1 1 read-write
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4