STM32F7 16 Digital-to-analog converter (DAC)

Started by tha, November 29, 2022, 07:32:26 AM

Previous topic - Next topic

tha

16.4.4 Independent trigger with single triangle generation

เพื่อกำหนดค่า the DAC ใน conversion mode นี้, ลำดับดังต่อไปนี้ถูกต้องการ :
•   เซ็ต the two DAC channel trigger enable bits TEN1 และ TEN2
•   กำหนดค่าแหล่งทริกที่แตกต่างกันโดยการเซ็ตค่าที่แตกต่างกันใน the TSEL1[2:0] และ TSEL2[2:0] bits
•   กำหนดค่า the two DAC channel WAVEx[1:0] bits เป็น "1x" และ the same maximum amplitude value ใน the
     MAMPx[3:0] bits
•   โหลด the dual DAC channel data ลงใน the desired DHR register (DAC_DHR12RD, DAC_DHR12LD or
     DAC_DHR8RD)

เมื่อ a DAC channel1 trigger มาถึง, the DAC channel1 triangle counter, ด้วย the same triangle amplitude, ถูกเพิ่มไปยัง the DHR1 register และผลรวมจะถูกส่งถ่ายลงใน DAC_DOR1 (three APB1 clock cycles ต่อมา). The DAC channel1 triangle counter จากนั้นจะถูกอัฟเดต.

เมื่อ a DAC channel2 trigger มาถึง, the DAC channel2 triangle counter, ด้วย the same triangle amplitude, ถูกเพิ่มไปยัง the DHR2 register และผลรวมจะถูกส่งถ่ายลงใน DAC_DOR2 (three APB1 clock cycles ต่อมา). The DAC channel2 triangle counter จากนั้นจะถูกอัฟเดต.

tha

16.4.5 Independent trigger with different triangle generation

เพื่อกำหนดค่า the DAC ใน conversion mode นี้, ลำดับดังต่อไปนี้ถูกต้องการ :
•   เซ็ต the two DAC channel trigger enable bits TEN1 และ TEN2
•   กำหนดค่าแหล่งทริกที่แตกต่างกันโดยการเซ็ตค่าที่แตกต่างกันใน the TSEL1[2:0] และ TSEL2[2:0] bits
•   กำหนดค่า the two DAC channel WAVEx[1:0] bits เป็น "1x" และเซ็ต different maximum amplitude values ใน the
     MAMP1[3:0] และ MAMP2[3:0] bits
•   โหลด the dual DAC channel data ลงใน the desired DHR register (DAC_DHR12RD, DAC_DHR12LD or
     DAC_DHR8RD)

เมื่อ a DAC channel1 trigger มาถึง, the DAC channel1 triangle counter, ด้วย a triangle amplitude กำหนดค่าโดย  MAMP1[3:0], ถูกเพิ่มไปยัง the DHR1 register และผลรวมจะถูกส่งถ่ายลงใน DAC_DOR1 (three APB1 clock cycles ต่อมา). The DAC channel1 triangle counter จากนั้นจะถูกอัฟเดต.

เมื่อ a DAC channel2 trigger มาถึง, the DAC channel2 triangle counter, ด้วย a triangle amplitude กำหนดค่าโดย MAMP2[3:0], ถูกเพิ่มไปยัง the DHR2 register part และผลรวมจะถูกส่งถ่ายลงใน DAC_DOR2 (three APB1 clock cycles ต่อมา). The DAC channel2 triangle counter จากนั้นจะถูกอัฟเดต.

tha

16.4.6 Simultaneous software start

เพื่อกำหนดค่า the DAC ใน conversion mode นี้, ลำดับดังต่อไปนี้ถูกต้องการ :
•   โหลด the dual DAC channel data ไปยัง the desired DHR register (DAC_DHR12RD, DAC_DHR12LD or
     DAC_DHR8RD)

ในการกำหนดค่านี้, one APB1 clock cycle ต่อมา, the DHR1 and DHR2 registers  ถูกส่งถ่ายลงใน DAC_DOR1 and DAC_DOR2, ตามลำดับ.


tha

16.4.7 Simultaneous trigger without wave generation

เพื่อกำหนดค่า the DAC ใน conversion mode นี้, ลำดับดังต่อไปนี้ถูกต้องการ :
•   เซ็ต the two DAC channel trigger enable bits TEN1 และ TEN2
•   กำหนดค่าแหล่งทริกเดียวกันสำหรับทั้งสอง DAC channels โดยการเซ็ตค่าเดียวกันใน the TSEL1[2:0] and TSEL2[2:0] bits
•   โหลด the dual DAC channel data ไปยัง the desired DHR register (DAC_DHR12RD, DAC_DHR12LD or
     DAC_DHR8RD)

เมื่อ a trigger มาถึง, the DHR1 and DHR2 registers ถูกส่งถ่ายลงใน DAC_DOR1 and DAC_DOR2, ตามลำดับ (หลังจาก three APB1 clock cycles).

tha

16.4.8 Simultaneous trigger with single LFSR generation

เพื่อกำหนดค่า the DAC ใน conversion mode นี้, ลำดับดังต่อไปนี้ถูกต้องการ :
•   เซ็ต the two DAC channel trigger enable bits TEN1 and TEN2
•   กำหนดค่าแหล่งทริกเดียวกันสำหรับทั้งสอง DAC channels โดยการเซ็ตค่าเดียวกันใน the TSEL1[2:0] and TSEL2[2:0] bits
•   กำหนดค่า the two DAC channel WAVEx[1:0] bits เป็น "01" และ the same LFSR mask value ใน the MAMPx[3:0]
     bits
•   โหลด the dual DAC channel data ไปยัง the desired DHR register (DHR12RD, DHR12LD or DHR8RD)

เมื่อ a trigger มาถึง, the LFSR1 counter, ด้วย the same mask, ถูกเพิ่มไปยัง the DHR1 register และผลรวมจะถูกส่งถ่ายลงใน DAC_DOR1 (three APB1 clock cycles ต่อมา). The LFSR1 counter จากนั้นจะถูกอัฟเดต. ในเวลาเดียวกัน, the LFSR2 counter, ด้วย the same mask,  ถูกเพิ่มไปยัง the DHR2 register และผลรวมจะถูกส่งถ่ายลงใน DAC_DOR2 (three APB1 clock cycles ต่อมา). The LFSR2 counter จากนั้นจะถูกอัฟเดต.

tha

16.4.9 Simultaneous trigger with different LFSR generation

เพื่อกำหนดค่า the DAC ใน conversion mode นี้, ลำดับดังต่อไปนี้ถูกต้องการ :
•   เซ็ต the two DAC channel trigger enable bits TEN1 and TEN2
•   กำหนดค่าแหล่งทริกเดียวกันสำหรับทั้งสอง DAC channels โดยการเซ็ตค่าเดียวกันใน the TSEL1[2:0] and TSEL2[2:0] bits
•   กำหนดค่า the two DAC channel WAVEx[1:0] bits เป็น "01" และเซ็ต different LFSR masks values โดยใช้ the
     MAMP1[3:0] และ MAMP2[3:0] bits
•   โหลด the dual DAC channel data ลงใน the desired DHR register (DAC_DHR12RD, DAC_DHR12LD or
     DAC_DHR8RD)

เมื่อ a trigger มาถึง, the LFSR1 counter, ด้วย the mask กำหนดค่าโดย MAMP1[3:0] , ถูกเพิ่มไปยัง the DHR1 register และผลรวมจะถูกส่งถ่ายลงใน DAC_DOR1 (three APB1 clock cycles ต่อมา). The LFSR1 counter จากนั้นจะถูกอัฟเดต.

ในเวลาเดียวกัน, the LFSR2 counter, ด้วย the mask  กำหนดค่าโดย MAMP2[3:0] , ถูกเพิ่มไปยัง the DHR2 register และผลรวมจะถูกส่งถ่ายลงใน DAC_DOR2 (three APB1 clock cycles ต่อมา). The LFSR2 counter จากนั้นจะถูกอัฟเดต.

tha

16.4.10 Simultaneous trigger with single triangle generation

เพื่อกำหนดค่า the DAC ใน conversion mode นี้, ลำดับดังต่อไปนี้ถูกต้องการ :
•   เซ็ต the two DAC channel trigger enable bits TEN1 and TEN2
•   กำหนดค่าแหล่งทริกเดียวกันสำหรับทั้งสอง DAC channels โดยการเซ็ตค่าเดียวกันใน the TSEL1[2:0] and TSEL2[2:0] bits
•   กำหนดค่า the two DAC channel WAVEx[1:0] bits เป็น "1x"  และ the same maximum amplitude value โดยใช้ the
     MAMPx[3:0] bits
•   โหลด the dual DAC channel data ลงใน the desired DHR register (DAC_DHR12RD, DAC_DHR12LD or
     DAC_DHR8RD)

เมื่อ a trigger มาถึง, the DAC channel1 triangle counter, ด้วย the same triangle amplitude, ถูกเพิ่มไปยัง the DHR1 register และผลรวมจะถูกส่งถ่ายลงใน DAC_DOR1 (three APB1 clock cycles ต่อมา). The DAC channel1 triangle counter จากนั้นจะถูกอัฟเดต.

ในเวลาเดียวกัน, the DAC channel2 triangle counter, ด้วย the same triangle amplitude, ถูกเพิ่มไปยัง the DHR2 register และผลรวมจะถูกส่งถ่ายลงใน DAC_DOR2 (three APB1 clock cycles ต่อมา). The DAC channel2 triangle counter จากนั้นจะถูกอัฟเดต.

tha

16.4.11 Simultaneous trigger with different triangle generation

เพื่อกำหนดค่า the DAC ใน conversion mode นี้, ลำดับดังต่อไปนี้ถูกต้องการ :
•   เซ็ต the two DAC channel trigger enable bits TEN1 and TEN2
•   กำหนดค่าแหล่งทริกเดียวกันสำหรับทั้งสอง DAC channels โดยการเซ็ตค่าเดียวกันใน the TSEL1[2:0] and TSEL2[2:0] bits
•   กำหนดค่า the two DAC channel WAVEx[1:0] bits เป็น "1x" และเซ็ต different maximum amplitude values ใน the
     MAMP1[3:0] และ MAMP2[3:0] bits
•   Load the dual DAC channel data into the desired DHR register (DAC_DHR12RD,
     DAC_DHR12LD or DAC_DHR8RD)

เมื่อ a trigger มาถึง, the DAC channel1 triangle counter, ด้วย a triangle amplitude กำหนดค่าโดย MAMP1[3:0], ถูกเพิ่มไปยัง the DHR1 register และผลรวมจะถูกส่งถ่ายลงใน DAC_DOR1 (three APB1 clock cycles ต่อมา). จากนั้น the DAC channel1 triangle counter จะถูกอัฟเดต.

ในเวลาเดียวกัน, the DAC channel2 triangle counter, ด้วย a triangle amplitude กำหนดค่าโดย MAMP2[3:0], ถูกเพิ่มไปยัง the DHR2 register และผลรวมจะถูกส่งถ่ายลงใน DAC_DOR2 (three APB1 clock cycles ต่อมา). จากนั้น the DAC channel2 triangle counter จะถูกอัฟเดต.