cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F2 Inverted DAC output on some boards

panvicka
Associate II

Hello,

I have 3 boards with STM32F205RBT using 2xDAC and 9xADC. Two boards are working just fine but one board has the second DAC output inverted (write 0 ->3V, write 4094 ->0v). The same program is used, boards are the same.

The DAC output is amplified with oamp LM324APT. Before the oamp there is 1k current limiting resistor in series and 100k pulldown. The same connection is used with success in several other projects.

When I disable the DAC output buffer, the output is no longer inverted. But I would like to keep the output buffer enabled (otherwise is the output voltage not correct...).

  sConfig.DAC_OutputBuffer = DAC_OUTPUTBUFFER_DISABLE;

I expect a HW problem - ESD or something gone wrong in the soldering process...?

I have found several more threads with the same problem but there was no solution proposed. The threads are old (2015-2018). Maybe there is a solution now...

Can I prevent this problem? If so, how? This board is going into production and I would like to solve it before that...

https://community.st.com/s/question/0D50X00009Xkfc8/inverted-dac

https://community.st.com/s/question/0D50X00009Xka1aSAB/stm32f427-inverted-dac-output

https://community.st.com/s/question/0D50X00009Xkh6F/inverted-dac-output

https://community.st.com/s/question/0D50X00009XkZsSSAV/my-dac-outputs-inverted-values-0000-33v-and-4095-0v

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions

> There is no way for the oamp to be powered when mcu is not or otherwise.

Not even during powerup/powerdown?

> I thought maybe is this problem related to STM32F2/4 serie (?). ​

Sounds much like so.

JW

View solution in original post

5 REPLIES 5

I believe the last post from the last thread you gave - which comes from an ST employee - gives you a definitive answer: the DAC output buffer on this chip is damaged.

> The DAC output is amplified with oamp LM324APT. Before the oamp there is 1k current limiting resistor in series and 100k pulldown.

ESD is always the possibility, but tell us perhaps more - how exactly are the STM32 (including and the opamp powered, can they be powered separately (i.e. can STM32 be powered down while the opamp is powered up), how is the second DAC connected, how are grounds arranged. Is there any high-powered electronics in the vicinity (motors, relays, contactors)?

> The same connection is used with success in several other projects.

With STM32? What are the differences, then?

JW.

Thank you for the answer. The first DAC output has the very same connection. It is 4layer board with only one gnd. There is no way for the oamp to be powered when mcu is not or otherwise. There will be motors near the pcb but right now they are on my table (on ESD mat).

The other project use STM32F0 and STM32F1 MCUs. It has never happened to me in 4 years and I have seen some stuff... I thought maybe is this problem related to STM32F2/4 serie (?). ​

Well I will just hope for the best I guess ☺�?​

Thank you anyway.​

> There is no way for the oamp to be powered when mcu is not or otherwise.

Not even during powerup/powerdown?

> I thought maybe is this problem related to STM32F2/4 serie (?). ​

Sounds much like so.

JW

> There is no way for the oamp to be powered when mcu is not or otherwise.

>> Not even during powerup/powerdown?

Well it can happen during powerup/down. I can have a look at that tomorrow.

I may have touched the MCU with my fingers when the board was powered... But I see people in our production hall doing the same sometimes :\

In case this turns out to be an issue in production I will just connect additional ADC to the DAC output and observe if the output is "inverted or not" and adjust the DAC output value :)

> will just connect additional ADC to the DAC output

It's already connected.

Also, if you use an external opamp, do you need to use the DAC buffer? If I understand the problem correctly, it's the buffer which gets damaged; if you switch it off you should see normal conversion.

JW