2016-10-27 10:26 AM
I've been making a device on STM32F407VGT6
That uses UART with both DMAs, DAC, few GPIO and Timers After some time coding it, ive came into shocking situation. DAC have become inverted! If i send 0, it sets 3.3V, if 4095 then 0.0V ! I've tried 1024, 2048, 3072 all of them are opocite like U=Vref-Vref*data/4095 Tried other device and they are fine. Maybe it's because i've passed few overbuffers ints to HAL_DAC_SetValue? Tried full erasing & reprogramming. Nothing helped. Is this chip wasted? #stm32 #stm32f4 #dac2016-10-27 12:03 PM
Seen several similar reports on the forum, you might want to review them and see if you share anything in common.
Maybe it's because i've passed few overbuffers ints to HAL_DAC_SetValue?Doubt it.Tried full erasing & reprogramming. There are few things that can be fixed in such a way. Especially if you program it with the same code.Is this chip wasted?Quite likely, you should perhaps examine your design and power configuration. Consider what you did that might cause failure, like applying large voltages.Desolder and replace, evaluate new part in circuit.2016-10-27 01:50 PM
Be sure, you measure between the DAC output and GND, not VCC ;)
2016-10-28 11:52 AM
I can guess that DAC should not be used as a power source it self, that there should be an OP repeater after it.
But i just want to control of mosfets gate of IRL. Is that's fine? I can't find any data on current load of the DAC. Is there any other warnings except noise about connecting V+ and Vref to Vcc of MCU?2016-10-28 12:29 PM
You can find the output capability of the DAC in the data sheet. AFAIK the DAC has the output impedance of about 15K. It's enough to drive MOSFET's gate directly provided, the frequency is not too high (say, under 100Hz). The reason: MOSFET's gate has a parasitic capacitance: the higher the frequency, the lower the impedance. It would not damage the DAC output but the signal form will suffer, should it be important.