Home > other >  STM32H7 DAC PA4 PA5
STM32H7 DAC PA4 PA5

Time:03-23

[b] problem description: I put the DAC is connected to the shipment, from PE7 output, want to PA5 as clock output of SP1, the result can't be used as long as can make DAC2 PA5,
Manual has a word: if the DAC output and output pad disconnected and connected to the on-chip peripherals, DAC_OUTx (PA4, PA5) pin can be used as a generic input/
Output (GPIO),
Setting:
A thou MODE2 [2-0] : DAC Channel 2 model (DAC Channel mode 2)
Only when the DAC has banned and not in the calibration mode (DACx_CR register EN2=0 and
A CEN2=0) to write these, if EN2=1 or CEN2=1, will ignore the write operation,
These bits can be 1 and reset by software, is used to select the DAC channel 2 model,
- DAC channel 2 is in normal mode
000: DAC channel 2 is connected to the external pins and can make the buffer
001: DAC channel 2 is connected to the external pins and on-chip peripherals and can make the buffer
010: DAC channel 2 is connected to the external pins and banned buffer
011: DAC channel 2 is connected to the on-chip peripherals and banned buffer
- DAC channel 2 in sampling and maintaining patterns
100: DAC channel 2 is connected to the external pins and can make the buffer
101: DAC channel 2 is connected to the external pins and on-chip peripherals and can make the buffer
110: DAC channel 2 is connected to the external pins and on-chip peripherals and banned buffer
111: DAC channel 2 is connected to the on-chip peripherals and banned buffer

The above parameters are tried, PA5 cannot serve as the output, but can be set to input,
Don't know where is wrong, please give directions, thank you!
  • Related