DS14927 · DatasheetArm® Cortex®-M33 32-bit MCU with FPU, 144 MHz, 593 CoreMark®, 512‑Kbyte dual‑bank flash memory, 128-Kbyte RAM, cryptography
Download .pdfOpen in the full document

Cyclic redundancy check calculation unit (CRC)

Cyclic redundancy check calculation unit (CRC)

The cyclic redundancy check calculation unit (CRC) calculation unit is used to get a CRC code from 8‑, 16‑, or 32‑bit data word and a generator polynomial.

Among other applications, CRC‑based techniques are used to verify data transmission or storage integrity. In the scope of the functional safety standards, they offer a means of verifying the flash memory integrity. The CRC calculation unit helps compute a signature of the software during runtime, to be compared with a reference signature generated at link time and stored at a given memory location.

Analog-to-digital converter (ADC)

The devices embed up to two analog-to-digital converters (ADC).
  • ADC1 and ADC2 are tightly coupled and can operate in dual mode (ADC1 is the master).

Each ADC consists of one 12-bit successive approximation analog-to-digital converter. Each ADC has up to 14 multiplexed channels. A/D conversion of the various channels can be performed in single, continuous, scan, or discontinuous mode. The result of the ADC is stored in a left‑aligned or right‑aligned (default configuration) 32‑bit data register.

The ADCs are mapped on the AHB bus to allow fast data handling. The analog watchdog features allow the application to detect if the input voltage goes outside the user‑defined high or low thresholds.

A built-in hardware oversampler improves analog performance while off‑loading the related computational burden from the CPU. An efficient low‑power mode is implemented to allow very low consumption at low frequency.

The ADC main features are:

  • High-performance features:
    • Up to two ADCs which can operate in dual mode
      • ADC1 is connected to 12 external channels and two internal channels.
      • ADC2 is connected to 14 external channels.
    • 12, 10, 8, or 6-bit configurable resolution
    • ADC conversion time independent from the AHB bus clock frequency
    • Faster conversion time by lowering resolution
    • AHB slave bus interface to allow fast data handling
    • Channel-wise programmable sampling time
    • Flexible sampling time control
    • Fixed latency for a trigger to start of sampling
    • Up to four injected channels (analog inputs assignment to regular or injected channels is fully configurable)
    • Data alignment with in-built data coherency
    • Data can be managed by DMA for regular channel conversions
    • Four dedicated data registers for the injected channels
  • Low-power features:
    • Speed adaptive low-power mode to reduce ADC consumption when operating at low frequency
    • Allows slow bus frequency application while keeping optimum ADC performance
    • Provides automatic control to avoid ADC overrun in low AHB bus clock frequency application (autodelayed mode)
  • Oversampler:
    • 32-bit data register
    • Oversampling ratio adjustable from 2 to 1024
    • Programmable data right and left shifts
  • Data preconditioning:
    • Gain compensation
    • Offset compensation
  • Analog input channels:
    • External analog inputs (per ADC): up to 14 GPIO pads
    • One channel for the internal reference voltage (VREFINT)
    • One channel for the internal temperature sensor (VSENSE)
  • Start-of-conversion can be initiated:
    • By software for both regular and injected conversions
    • By hardware triggers with configurable polarity (internal timer events or GPIO input events) for both regular and injected conversions
  • Conversion modes:
    • Each ADC can convert a single channel or can scan a sequence of channels
    • Single mode converts selected inputs once per trigger
    • Continuous mode converts selected inputs continuously
    • Discontinuous mode
  • Interrupt generation at ADC ready, the end of sampling, the end of conversion (regular or injected), end of sequence conversion (regular or injected), analog watchdog 1, 2, or 3, or overrun events
  • Three analog watchdogs per ADC
  • ADC input range: VSSA ≤ VIN ≤ VREF+
Table 5. ADC features
ADC modes/featuresADC1ADC2
Resolution12 bits
Maximum sampling-speed2.25 Msps
Hardware-offset calibrationX
Single-ended inputsX
Injected channel conversionX
Oversamplingup to x1024
Data register32 bits
DMA supportX
Offset compensationX
Gain compensationX
Number of analog watchdogs3

Analog temperature sensor

The STM32C562xx embed an analog temperature sensor that generates a voltage VSENSE that varies linearly with temperature. The temperature sensor is internally connected to the ADC input channel that is used to convert the sensor output voltage into a digital value.

The sensor provides good linearity but it must be calibrated to obtain a good accuracy of the temperature measurement. As the offset of the temperature sensor varies from chip to chip due to process variation, the uncalibrated internal temperature sensor is suitable for applications that detect temperature changes only.

To improve the accuracy of the temperature sensor measurement, each device is individually factory‑calibrated by STMicroelectronics. The temperature sensor factory calibration data are stored by STMicroelectronics in the system memory area, accessible in read‑only mode.

Internal voltage reference (VREFINT)

The VREFINT provides a stable (bandgap) voltage output for the ADC and the comparator. It is internally connected to ADC input channel.

The precise voltage of VREFINT is individually measured for each part by STMicroelectronics during production test and stored in the system memory area. It is accessible in read‑only mode.

Digital to analog converter (DAC)

The DAC module is a 12‑bit, voltage output digital‑to‑analog converter. The DAC can be configured in 8‑ or 12‑bit mode and can be used in conjunction with the DMA controller. In 12‑bit mode, the data may be left‑aligned or right‑aligned.

An input reference pin, VREF+ (shared with others analog peripherals) is available for better resolution.

The DAC_OUT1 pin can be used as general-purpose input/output (GPIO) when the DAC output is disconnected from the output pad and connected to the on chip peripheral. The DAC output buffer can be optionally enabled to allow a high drive output current. An individual calibration can be applied DAC output channel. The DAC output channels support a low-power mode, the sample and hold mode.

The DAC main features are::
  • Left or right data alignment in 12-bit mode
  • Synchronized update capability
  • Noise-wave and triangular-wave generation
  • DMA capability for each channel including DMA underrun error detection
  • Double-data DMA capability to reduce the bus activity
  • External triggers for conversion
  • DAC output-channel buffered/unbuffered modes
  • Buffer offset calibration
  • DAC output can be disconnected from the DAC_OUTx output pin
  • DAC output connection to on chip peripherals
  • Sample and hold mode for low-power operation in Stop mode
  • Voltage reference input from VREF+ pin

Low-power comparator (COMP)

The device embeds a low-power comparator (COMP). It can be used for a variety of functions including:

  • Wake-up from low-power mode triggered by an analog signal
  • Analog signal conditioning
  • Cycle-by-cycle current control loop when combined with a PWM output from a timer

The COMP main features are:

  • Selectable inverting analog inputs:
    • I/O pins
    • DAC channel output
    • Internal reference voltage and three submultiple values (1/4, 1/2, 3/4) provided by the scaler (buffered voltage divider)
  • I/O pins selectable as noninverting analog inputs
  • Programmable hysteresis
  • Programmable speed/consumption
  • Mapping of outputs to I/Os
  • Redirection of outputs to timer inputs for triggering:
    • Capture events
    • OCREF_CLR events (for cycle-by-cycle current control)
    • Break events for fast PWM shutdowns
  • Blanking of comparator outputs
  • Interrupt generation capability with wake-up from Sleep and Stop modes (through the EXTI controller)
  • Direct interrupt output to the CPU

True random number generator (RNG)

The RNG is a true random number generator that provides full entropy outputs to the application as 32‑bit samples. It is composed of a live entropy source (analog) and an internal conditioning component.

The RNG is a NIST SP 800-90B compliant entropy source that can be used to construct a nondeterministic random bit generator (NDRBG).

The RNG can be certified NIST SP800-90B. It has also been tested using the German BSI statistical tests of AIS-31 (T0 to T8).

The RNG main features are the following:

  • The RNG delivers 32-bit true random numbers, produced by an analog entropy source conditioned by a NIST SP800-90B approved conditioning stage.
  • It can be used as the entropy source to construct a nondeterministic random bit generator (NDRBG).
  • In the default configuration, it produces four 32-bit random samples every 412 AHB clock cycles if fAHB < fthreshold (256 RNG clock cycles otherwise).
  • It embeds startup and NIST SP800-90B approved continuous health tests (repetition count and adaptive proportion tests), associated with specific error management.
  • It can be disabled to reduce power consumption, or enabled with an automatic low power mode (default configuration).
  • It has an AMBA® AHB slave peripheral, accessible through 32-bit word single accesses only (else an AHB bus error is generated, and the write accesses are ignored).

AES hardware accelerator (AES)

The AES hardware accelerator (AES) encrypts or decrypts data in compliance with the advanced encryption standard (AES) defined by NIST.

AES supports ECB, CBC, CTR, GCM, GMAC, and CCM chaining modes for key sizes of 128 or 256 bits.

The peripheral supports DMA single transfers for incoming and outgoing data (two DMA channels are required).

The AES main features are:

  • Compliant with NIST FIPS publication 197 “Advanced encryption standard (AES)” (November 2001)
  • Encryption and decryption with multiple chaining modes:
    • Electronic codebook (ECB) mode
    • Cipher block chaining (CBC) mode
    • Counter (CTR) mode
    • Galois counter mode (GCM)
    • Galois message authentication code (GMAC) mode
    • Counter with CBC-MAC (CCM) mode
  • 128-bit data block processing, supporting cipher key lengths of 128‑bit and 256‑bit
    • 51 or 75 clock cycle latency in ECB mode for processing one 128‑bit block with, respectively, 128‑bit or 256‑bit key
  • Integrated key scheduler to compute the last round key for ECB/CBC decryption
  • 256-bit write-only registers for storing cryptographic keys (eight 32‑bit registers)
  • 128-bit registers for storing initialization vectors (four 32‑bit registers)
  • 32-bit buffer for data input and output
  • Automatic data flow control supporting two direct memory access (DMA) channels, one for incoming data, one for processed data. Only single transfers are supported.
  • Data-swapping logic to support 1-, 8-, 16-, or 32-bit data
  • AMBA AHB slave peripheral, accessible through 32-bit word single accesses only. Other access types generate an AHB error, and other than 32‑bit writes may corrupt the register content.
  • Software (in CPU mode only, not in DMA mode) can suspend a message if AES needs to process another message with a higher priority, then resume the original message.
Table 6. AES features
Modes or features1AES
ECB, CBC chainingX
CTR, CCM, GCM chainingX
AES 128-bit ECB encryption in cycles51
DHUK and BHK key selection-
Resistant to side-channel attacks-
Shared key between SAES and AESX
Key sizes in bits128/256
1 X = supported.