STM32F7 12 Cyclic redundancy check calculation unit (CRC)

Started by tha, November 09, 2022, 07:36:36 AM

Previous topic - Next topic

tha

12.4.2 Independent data register (CRC_IDR)

Address offset: 0x04
Reset value: 0x0000 0000



Bits 31:8 Reserved, must be kept at reset value.

Bits 7:0 IDR[7:0]: General-purpose 8-bit data register bits
     บิตเหล่านี้สามารถถูกใช้เป็น a temporary storage location สำหรับ one byte.
     register นี้ไม่ได้รับผลกระทบโดย CRC resets ที่สร้างโดย the RESET bit ใน the CRC_CR register

tha

12.4.3 Control register (CRC_CR)

Address offset: 0x08
Reset value: 0x0000 0000



Bits 31:8 Reserved, must be kept at reset value.

Bit 7 REV_OUT: Reverse output data
     บิตนี้ควบคุม the reversal ของ the bit order ของ the output data.
     0: Bit order ไม่ได้รับผลกระทบ
     1: Bit-reversed output format

Bits 6:5 REV_IN[1:0]: Reverse input data
     บิตเหล่านี้ควบคุม the reversal ของ the bit order ของ the input data
     00: Bit order ไม่ได้รับผลกระทบ
     01: Bit reversal ที่ทำโดย byte
     10: Bit reversal done by half-word
     11: Bit reversal done by word

Bits 4:3 POLYSIZE[1:0]: Polynomial size
     บิตเหล่านี้ควบคุมขนาดของ the polynomial.
     00: 32 bit polynomial
     01: 16 bit polynomial
     10: 8 bit polynomial
     11: 7 bit polynomial

Bits 2:1 Reserved, must be kept at reset value.

Bit 0 RESET: RESET bit
     บิตนี้ถูกเซ็ตโดย software เพื่อรีเซ็ต the CRC calculation unit และเซ็ต the data register เป็นค่าที่เก็บใน the CRC_INIT
     register. บิตนี้สามารถถูกเซ็ตเท่านั้น, มันจะถูกเคลียร์โดยอัตโนมัติโดย hardware

tha

12.4.4 Initial CRC value (CRC_INIT)

Address offset: 0x10
Reset value: 0xFFFF FFFF



Bits 31:0 CRC_INIT[31:0]: Programmable initial CRC value
     register นี้ถูกใช้เพื่อเขียน the CRC initial value.


tha

12.4.5 CRC polynomial (CRC_POL)

Address offset: 0x14
Reset value: 0x04C1 1DB7



Bits 31:0 POL[31:0]: Programmable polynomial
     รีจิสเตอร์นี้ถูกใช้เพื่อเขียนสัมประสิทธิ์ของพหุนามที่จะถูกใช้สำหรับ CRC calculation.
     ถ้า the polynomial size น้อยกว่า 32 bits, the least significant bits ต้องถูกใช้เพื่อโปรแกรม the correct value.