Electoday 2025

ไมโครคอนโทรลเลอร์ => ARM Processors => Topic started by: tha on December 16, 2022, 08:26:33 AM

Title: STM32F7 19 True random number generator (RNG)
Post by: tha on December 16, 2022, 08:26:33 AM
19 True random number generator (RNG)

19.1 Introduction

The RNG คือ a true random number generator ที่จัดให้มี 32-bit entropy samples อย่างต่อเนื่อง, มีรากฐานบน an analog noise source. มันสามารถถูกใช้โดย the application เป็น a live entropy source เพื่อสร้างd a NIST compliant Deterministic Random Bit Generator (DRBG).

The RNG true random number generator ถูกตรวจสอบความถูกต้องแล้วตาม the German AIS-31 standard.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 16, 2022, 09:03:28 AM
19.2 RNG main features

•   The RNG ส่งมอบ 32-bit true random numbers, ที่ผลิตโดย an analog entropy source ที่ประมวลผลภายหลังด้วย linear-
     feedback shift registers (LFSR).
•   มันถูกตรวจสอบความถูกต้องตาม the AIS-31 pre-defined class PTG.2 evaluation methodology, ซึ่งเป็นส่วนหนึ่งของ the
     German Common Criteria (CC) scheme.
•   มันผลิต one 32-bit random samples ทุกๆ 42 RNG clock cycles (clock ที่อุทิศให้).
•   มันอนุญาตให้ embedded continuous basic health tests ที่มี associated error management
     –   รวม too low sampling clock detection และ repetition count tests.
•   มันสามารถถูกปิดใช้งานเพื่อลด power consumption.
•   มันมี an AMBA AHB slave peripheral, สามารถเข้าถึงได้ผ่านทาง 32-bit word single accesses เท่านั้น (นอกเหนือจากนั้น an
     AHB bus error จะถูกสร้าง). คำเตือน! การเขียนใด ๆ ที่ไม่เท่ากับ 32 bits อาจทำให้ the register content เสียหาย.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 16, 2022, 09:13:33 AM
19.3 RNG functional description

19.3.1 RNG block diagram

Figure 116 แสดง the RNG block diagram.

(https://i.imgur.com/awsoEeh.png)
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 16, 2022, 01:35:15 PM
19.3.2 RNG internal signals

Table 121 อธิบายรายการของประโยชน์น่ารู้ internal signals มีให้ใช้งานที่ the RNG level, ไม่ใช่ที่ the STM32 product level (on pads).

(https://i.imgur.com/oT4eud0.png)
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 16, 2022, 02:07:27 PM
19.3.3 Random number generation

The true random number generator (RNG) ส่งมอบ random data อย่างแท้จริงผ่านทาง AHB interface ของมันในช่วงเวลาที่กำหนด. The RNG จัดให้มีใช้ the entropy source model ตามภาพใน Figure 117, และจัดให้มีฟังก์ชันหลักสามประการสำหรับแอปพลิเคชัน:
•   รวบรวม the bitstring output ของ the entropy source box
•   รับตัวอย่างของ the noise source เพื่อวัตถุประสงค์ในการตรวจสอบความถูกต้อง
•   รวบรวม error messages จาก continuous health tests

(https://i.imgur.com/rQKHhRG.png)

ส่วนประกอบหลักของ the RNG คือ:
•   แหล่งที่มาของ physical randomness (analog noise source)
•   ขั้นตอนการแปลงเป็นดิจิทัลสำหรับ analog noise source นี้
•   ขั้นตอนการส่งมอบ post-processed noise source (raw data)
•   An output buffer สำหรับ the raw data. ถ้า cryptographic conditioning เพิ่มเติมถูกต้องการโดย the application มันจะ
     จำเป็นต้องถูกดำเนินการโดย software.
•   เอาต์พุตเสริมสำหรับ the digitized noise source (ไม่มีบัฟเฟอร์, บน digital pads)
•   Basic health tests บน the digitized noise source
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 17, 2022, 10:35:15 AM
ส่วนประกอบทั้งหมดถูกให้รายละเอียดด้านล่าง

Noise source

The noise source เป็นองค์ประกอบที่บรรจุ the non-deterministic, entropy-providing activity ที่ในที่สุดรับผิดชอบต่อความไม่แน่นอนที่เกี่ยวข้องกับ the bitstring output โดย the entropy source. มันถูกประกอบด้วย:
•   Two analog noise sources, แต่ละมีรากฐานบน three XOR free-running ring oscillator outputs. มันสามารถเป็นได้ที่จะ
     ปิดใช้งาน analog oscillators เหล่านั้นเพื่อประหยัดพลังงาน, ดังอธิบายใน Section 19.4: RNG low-power usage.
•   ขั้นตอนการสุ่มตัวอย่างของเอาต์พุตเหล่านี้ถูกให้สัญญานนาฬิกาโดย a dedicated clock input (rng_clk), ส่งมอบ a 2-bit raw data
     output.

noise source sampling นี้เป็นอิสระจาก the AHB interface clock frequency (rng_hclk).

Note: ใน Section 19.7: Entropy source validation recommended(ที่แนะนำ) RNG clock frequencies ถูกให้ไว้.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 17, 2022, 11:13:02 AM
Post processing

The sample values ที่ได้รับจาก a true random noise source ประกอบด้วย 2-bit bitstrings. เนื่องจาก noise source output นี้ถูกไบอัส, the RNG จัดให้มีใช้ a post-processing component ที่ลดการไบอัสนั้นให้อยู่ในระดับที่ยอมรับได้.

The RNG post-processing ประกอบด้วยสองขั้นตอน ซึ่งนำไปใช้กับแต่ละ noise source bits:
•   The RNG เอาครึ่งหนึ่งของ the bits จาก the sampled noise source, และครึ่งหนึ่งของ the bits จาก inverted sampled noise
     source. ดังนั้น, ถ้า the source สร้าง '1' มากกว่า '0' (หรือตรงกันข้าม), มันจะถูกกรอง
•   A linear feedback shift register (LFSR) ดำเนินการ a whitening process, ผลิต 8-bit strings.

ส่วนประกอบนี้ถูกให้สัญญานนาฬิกาโดย the RNG clock.

The times ที่ต้องการระหว่าง two random number generations, และระหว่าง the RNG initialization และ availability of first sample ถูกอธิบายใน Section 19.6: RNG processing time.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 17, 2022, 11:50:47 AM
Output buffer

The RNG_DR data output register สามารถจัดเก็บมากถึง two 16-bit words ซึ่งถูกส่งออกมาจาก the post-processing component (LFSR). เพื่ออ่านกลับ 32-bit random samples ต้องรอ 42 RNG clock cycles.

เมื่อใดก็ตามที่ a random number มีให้ใช้งานผ่านทางh the RNG_DR register the DRDY flag เปลี่ยนผ่านจาก "0" ไปเป็น "1". แฟล็คนี้ยังคง high จนกว่า output buffer กลายมาเป็นว่างเปล่าหลังจากการอ่าน one word จาก the RNG_DR register.

Note:  เมื่อ interrupts ถูกเปิดใช้งาน an interrupt จะถูกสร้างเมื่อ data ready flag นี้เปลี่ยนผ่านจาก "0" ไปเป็น "1". Interrupt จาก
           นั้นจะถูกเคลียร์โดยอัตโนมัติโดย the RNG ดังที่อธิบายข้างบน.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 17, 2022, 04:36:44 PM
Health checks

ส่วนประกอบนี้ทำให้แน่ใจว่า the entire entropy source (พร้อม noise source ของมัน) สตาร์ทจากนั้นทำงานตามที่คาดไว้, ได้รับการประกันว่า failures จะถูกตรวจจับได้อย่างรวดเร็วและด้วยความน่าจะเป็นและความน่าเชื่อถือที่สูง.

The RNG จัดให้มีใช้ the following health check features:
1.  Behavior tests, ถูกนำมาใช้กับ the entropy source ที่ run-time
      –   Repetition count test, ให้แฟล็ค an error เมื่อ :
     a)  หนึ่งใน the noise source จัดให้มีมากกว่า 64 บิตที่ติดต่อกันที่ a constant value ("0" หรือ "1")
     b)  หนึ่งใน the noise sources ส่งมอบมากกว่า 32 การเกิดขึ้นที่ติดต่อกันของ two bits patterns ("01" หรือ "10")
2.  Vendor specific continuous test
     –   Real-time "too slow" sampling clock detector, ให้แฟล็ค an error เมื่อ one RNG clock cycle น้อยกว่า AHB clock
          cycle หารด้วย 16.

The CECS and SECS status bits ใน the RNG_SR register แสดงให้เห็นเมื่อ an error condition ถูกตรวจพบ, ดังที่อธิบายใน Section 19.3.7: Error management.

Note:  An interrupt สามารถถูกสร้างเมื่อ an error ถูกตรวจพบ.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 19, 2022, 10:39:01 AM
19.3.4 RNG initialization

เมื่อ a hardware reset เกิดขึ้น ห่วงโซ่ของเหตุการณ์ต่อไปนี้จะเกิดขึ้น:
1.  The analog noise source ถูกเปิดใช้งาน, และ logic สตาร์ทการสุ่ม the analog output หลังจาก four RNG clock cycles, เติม
     LFSR shift register และ associated 16-bit post-processing shift register.
2.  The output buffer จะถูกเติมซ้ำโดยอัตโนมัติตาม the RNG usage.

The associated initialization time สามารถดูได้ที่ Section 19.6: RNG processing time.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 19, 2022, 11:07:51 AM
19.3.5 RNG operation

Normal operations

เพื่อรัน the RNG โดยใช้ interrupts ขั้นตอนต่อไปนี้ถูกแนะนำ:
1.  เปิดใช้งาน the interrupts โดยการเซ็ต the IE bit ใน the RNG_CR register. ในเวลาเดียวกันเปิดใช้งาน the RNG โดยการเซ็ต
     the bit RNGEN=1.
2.  An interrupt จะถูกสร้างเมื่อ a random number พร้อมแล้วหรือเมื่อ an error เกิดขึ้น. ดังนั้นแต่ละ interrupt, ตรวจสอบว่า:
     –   ไม่มี error เกิดขึ้น. The SEIS and CEIS bits ควรถูกเซ็ตเป็น '0' ใน the RNG_SR register.
     –   A random number พร้อมแล้ว. The DRDY bit ต้องถูกเซ็ตเป็น '1' ใน the RNG_SR register.
     –   ถ้าสองเงื่อนไขข้างบนเป็นจริง สิ่งที่บรรจุอยู่ภายในของ the RNG_DR register สามารถถูกอ่าน.

เพื่อรัน the RNG ใน polling mode ขั้นตอนต่อไปนี้ถูกแนะนำ:
1.  เปิดใช้งาน the random number generation โดยการเซ็ต the RNGEN bit เป็น "1" ใน the RNG_CR register.
2.  อ่าน the RNG_SR register และตรวจสอบว่า:
     –   ไม่มี error เกิดขึ้น (the SEIS and CEIS bits ควรถูกเซ็ตเป็น '0')
     –   A random number พร้อมแล้ว (the DRDY bit ควรถูกเซ็ตเป็น '1')
3.  ถ้าเงื่อนไขข้างบนเป็นจริง อ่านสิ่งที่บรรจุอยู่ภายในของ the RNG_DR register.

Note: เมื่อ data ไม่พร้อม (DRDY="0") RNG_DR ส่งคืนกลับศูนย์.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 19, 2022, 11:34:24 AM
Low-power operations

ถ้า the power consumption เป็นปัญหาต่อ the application, low-power strategies สามารถถูกใช้, ดังที่อธิบายใน Section 19.4: RNG low-power usage on page 549.

Software post-processing

ถ้า a NIST ที่อนุมัติ DRBG ที่มี 128 bits of security strength ถูกต้องการ an approved random generator software ต้องถูกสร้างรอบๆ the RNG true random number generator.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 19, 2022, 02:14:56 PM
19.3.6 RNG clocking

The RNG รันบน two different clocks: the AHB bus clock และ a dedicated RNG clock.

The AHB clock ถูกใช้เพื่อให้สัญญานนาฬิกา the AHB banked registers และ the post-processing component. The RNG clock ถูกใช้สำหรับ noise source sampling. Recommended clock configurations ถูกให้รายละเอียดใน Section 19.7: Entropy source validation.

Caution: เมื่อ the CED bit ใน the RNG_CR register ถูกเซ็ตเป็น "0", the RNG clock frequency ต้องสูงกว่า AHB clock
                 frequency ที่หารด้วย 16, มิฉะนั้น the clock checker จะให้แฟล็ค a clock error (CECS หรือ CEIS ใน the RNG_SR
                 register) และ the RNG จะหยุดการผลิต random numbers.

ดู Section 19.3.1: RNG block diagram สำหรับรายละเอียด (AHB and RNG clock domains).
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 19, 2022, 02:50:49 PM
19.3.7 Error management

ควบคู่ไปกับ random number generation an health check block จะตรวจสอบ the correct noise source behavior และ the frequency of the RNG source clock ตามที่ให้รายละเอียดในส่วนนี้. Associated error state ถูกอธิบายไว้ด้วย.

Clock error detection

เมื่อ the clock error detection ถูกเปิดใช้งาน (CED = 0) และถ้า the RNG clock frequency ต่ำเกินไป, the RNG จะหยุดการสร้าง random numbers และเซ็ตเป็น "1" ทั้ง the CEIS and CECS bits เพื่อแสดงให้เห็นว่า a clock error เกิดขึ้น. ในกรณีนี้, the application ควรตรวจเช็คว่า the RNG clock ถูกกำหนดค่าอย่างถูกต้อง (ดู Section 19.3.6: RNG clocking) และจากนั้นมันต้องเคลียร์ the CEIS bit interrupt flag. ทันทีที่ the RNG clock ทำงานอย่างถูกต้อง, the CECS bit จะถูกเคลียร์โดยอัตโนมัติ.

The RNG จะทำงานเฉพาะเมื่อ the CECS flag ถูกเซ็ตเป็น "0". อย่างไรก็ตาม โปรดทราบว่า the clock error ไม่มีผลกระทบต่อ the previously generated random numbers, และ the RNG_DR register contents ยังคงสามารถถูกใช้งานได้.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 19, 2022, 03:35:03 PM
Noise source error detection

เมื่อ a noise source (หรือ seed) error เกิดขึ้น, the RNG จะหยุดการสร้าง random numbers และเซ็ตเป็น "1" ทั้ง the SEIS and SECS bits เพื่อแสดงให้เห็นว่า a seed error เกิดขึ้น. ถ้า a value มีให้ใช้งานใน the RNG_DR register, มันต้องไม่ถูกใช้เนื่องจากมันอาจไม่มี entropy เพียงพอ.

เพื่อกู้คืนอย่างเต็มที่จาก a seed error application ต้องเคลียร์ the SEIS bit โดยการเขียนมันเป็น "0", จากนั้นเคลียร์และเซ็ต the RNGEN bit เพื่อเริ่มต้นใหม่และรีสตาร์ท the RNG.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 19, 2022, 03:50:29 PM
19.4 RNG low-power usage

ถ้า power consumption คือปัญหา, the RNG สามารถถูกปิดใช้งานทันทีที่ the DRDY bit ถูกเซ็ตเป็น "1" โดยการเซ็ต the RNGEN bit เป็น "0" ใน the RNG_CR register. The 32-bit random value ที่เก็บใน the RNG_DR register จะยังคงมีให้ใช้งาน. ถ้า a new random ถูกต้องการ the application จะจำเป็นต้องเปิดใช้งานใหม่ the RNG และรอเป็นเวลา 42+4 RNG clock cycles.

เมื่อปิดใช้งาน the RNG ผู้ใช้จะทำให้ไม่ทำงานทุก the analog seed generators, ซึ่ง power consumption ถูกให้ไว้ใน the datasheet electrical characteristics section.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 20, 2022, 09:12:08 AM
19.5 RNG interrupts

ใน the RNG an interrupt สามารถถูกผลิตบน the following events:
•   Data ready flag
•   Seed error, ดู Section 19.3.7: Error management
•   Clock error, ดู Section 19.3.7: Error management

Dedicated interrupt enable control bits มีให้ใช้งานดังที่แสดงใน Table 122

(https://i.imgur.com/lHcFvPz.png)

ผู้ใช้สามารถเปิดใช้งานหรือปิดใช้งาน the above interrupt sources เฉพาะรายไปโดยการเปลี่ยน the mask bits หรือ the general interrupt control bit IE ใน the RNG_CR register. สถานะของ the individual interrupt sources สามารถถูกอ่านจาก the RNG_SR register.

Note:  Interrupts ถูกสร้างเฉพาะเมื่อ RNG ถูกเปิดใช้งาน.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 20, 2022, 10:03:07 AM
19.6 RNG processing time

The RNG สามารถผลิต one 32-bit random numbers ทุกๆ 42 RNG clock cycles.

หลังจากการเปิดใช้งานหรือการเปิดใช้งานใหม่ the RNG โดยใช้ the RNGEN bit มันใช้ 46 RNG clock cycles ก่อน random data มีให้ใช้งาน.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 20, 2022, 10:30:36 AM
19.7 Entropy source validation

19.7.1 Introduction

เพื่อประเมินปริมาณของ entropy ที่มีให้ใช้งานจาก the RNG, STMicroelectronics ทดสอบ the peripheral กับชุดทดสอบ AIS-31 PTG.2. The results สามารถถูกจัดให้มีที่ความต้องการหรือลูกค้าสามารถสร้างการวัดซ้ำโดยใช้ the AIS reference software. ลูกค้ายังสามารถทดสอบ the RNG กับชุดทดสอบ an older NIST SP800-22.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 20, 2022, 10:34:01 AM
19.7.2 Validation conditions

STMicroelectronics ได้ตรวจสอบ the RNG true random number generator ในเงื่อนไขต่อไปนี้:
•   RNG clock rng_clk= 48 MHz (CED bit = '0' ใน RNG_CR register) และ rng_clk= 400kHz (CED bit="1" ใน RNG_CR)
•   AHB clock rng_hclk= 60 MHz
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 20, 2022, 10:40:31 AM
19.7.3 Data collection

ถ้า raw data จำเป็นต้องถูกอ่านแทน pre-processed data นักพัฒนาซอฟต์แวร์จะได้รับคำเชิญให้ติดต่อ STMicroelectronics เพื่อรับขั้นตอนที่ถูกต้องเพื่อทำตาม.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 20, 2022, 02:54:57 PM
19.8 RNG registers

The RNG ถูกเกี่ยวข้องกับ a control register, a data register และ a status register.

19.8.1 RNG control register (RNG_CR)

Address offset: 0x000
Reset value: 0x0000 0000

(https://i.imgur.com/uwOumqO.png)

Bits 31:6 Reserved, must be kept at reset value

Bit 5 CED: Clock error detection
     0: Clock error detection เปิดใช้งาน
     1: Clock error detection ปิดใช้งาน
     The clock error detection ไม่สามารถถูกเปิดใช้งานหรือปิดใช้งานกลางทางได้เมื่อ the RNG ถูกเปิดใช้งาน, ตัวอย่างเช่น เพื่อเปิดใช้
      งานหรือปิดใช้งาน CED the RNG ต้องถูกปิดใช้งาน.

Bit 4 Reserved, must be kept at reset value.

Bit 3 IE: Interrupt Enable
     0: RNG Interrupt ถูกปิดใช้งาน
     1: RNG Interrupt ถูกเปิดใช้งาน. An interrupt จะค้างอยู่ทันทีที่ DRDY='1', SEIS='1' หรือ CEIS='1' ใน the RNG_SR
          register.

Bit 2 RNGEN: True random number generator enable
     0: True random number generator ถูกปิดใช้งาน. Analog noise sources ถูก powered off และ logic ที่ให้สัญญานนาฬิกา
          โดย the RNG clock จะถูกปิดประตู.
     1: True random number generator ถูกเปิดใช้งาน.

Bits 1:0 Reserved, must be kept at reset value.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 20, 2022, 03:44:19 PM
19.8.2 RNG status register (RNG_SR)

Address offset: 0x004
Reset value: 0x0000 0000

(https://i.imgur.com/8qIFBlz.png)

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

Bit 6 SEIS: Seed error interrupt status
     บิตนี้ถูกเซ็ตในเวลาเดียวกันกับ SECS. มันจะถูกเคลียร์โดยการเขียนมันเป็น '0'.
     0: ไม่มี faulty sequence ถูกตรวจพบ
     1: อย่างน้อยหนึ่ง faulty sequence ถูกตรวจพบแล้ว. ดู SECS bit description สำหรับรายละเอียด.
     An interrupt จะค้างอยู่ถ้า IE = '1' ใน the RNG_CR register.

Bit 5 CEIS: Clock error interrupt status
     บิตนี้ถูกเซ็ตในเวลาเดียวกันกับ CECS. มันจะถูกเคลียร์โดยการเขียนมันเป็น '0'.
     0: The RNG clock ถูกต้อง (fRNGCLK > fHCLK/16)
     1: The RNG ถูกตรวจพบว่าช้าเกินไปแล้ว (fRNGCLK < fHCLK/16)
     An interrupt จะค้างอยู่ถ้า IE = '1' ใน the RNG_CR register.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 20, 2022, 04:07:37 PM
Bits 4:3 Reserved, must be kept at reset value.

Bit 2 SECS: Seed error current status
     0: ไม่มี faulty sequence ถูกตรวจพบในขณะนี้. ถ้า the SEIS bit ถูกเซ็ต, นี้หมายความว่า a faulty sequence เคยถูกตรวจพบและ
          สถานการณ์ถูกกู้คืนแล้ว.
     1: หนึ่งใน the noise source จัดให้มีมากกว่า 64 บิตที่ติดต่อกันที่ a constant value ("0" หรือ "1") หรือมากกว่า 32 การเกิดขึ้นที่
          ติดต่อกันของ two bits patterns ("01" หรือ "10")

Bit 1 CECS: Clock error current status
     0: The RNG clock ถูกต้อง (fRNGCLK> fHCLK/16). ถ้า the CEIS bit ถูกเซ็ต, นี้หมายความว่า a slow clock เคยถูกตรวจพบ
          และสถานการณ์ถูกกู้คืนแล้ว.
     1: The RNG clock ช้าเกินไป (fRNGCLK< fHCLK/16).
  Note:  CECS bit ใช้ได้เฉพาะถ้า the CED bit ใน the RNG_CR register ถูกเซ็ตเป็น "0".

Bit 0 DRDY: Data Ready
     0: The RNG_DR register ยังใช้ไม่ได้, ไม่มี random data มีให้ใช้งาน.
     1: The RNG_DR register บรรจุ valid random data.
     ทันทีที่ the RNG_DR register ถูกอ่านแล้ว, บิตนี้จะกลับคืนเป็น '0' จนกว่า a new random value จะถูกสร้าง.
     ถ้า IE='1' ใน the RNG_CR register, an interrupt จะถูกสร้างเมื่อ DRDY='1'.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 20, 2022, 04:21:40 PM
19.8.3 RNG data register (RNG_DR)

Address offset: 0x008
Reset value: 0x0000 0000

The RNG_DR register เป็น a read-only register ที่ส่งมอบ a 32-bit random value เมื่ออ่าน. หลังจากอ่าน register นี้จะส่งมอบ a new random value หลังจาก 42 periods of RNG clock ถ้า the output FIFO ว่างเปล่า.

สิ่งที่บรรจุอยู่ภายในของ register นี้จะใช้ได้เมื่อ DRDY='1', ถึงแม้ว่า RNGEN='0'.

(https://i.imgur.com/pNuAvUr.png)

Bits 31:0 RNDATA[31:0]: Random data
     32-bit random data ซึ่งใช้ได้เมื่อ DRDY='1'. เมื่อ DRDY='0' RNDATA value จะเป็นศูนย์.
Title: Re: STM32F7 19 True random number generator (RNG)
Post by: tha on December 20, 2022, 04:25:12 PM
19.8.4 RNG register map

Table 123 ให้ the RNG register map และ reset values.

(https://i.imgur.com/Q6Kbr0h.png)