cancel
Showing results for 
Search instead for 
Did you mean: 

Driving DAC too fast

cbcooper
Senior

I've got an STM32G491RE on a NUCLEO-G491RE board and I'm driving the DAC using TIM4's TRGO and pulling values out of a memory buffer using DMA.  It was a bit of a challenge getting set up, but now that it's running it's beautiful.

What's weird is that I've got TIM4 initialized with both prescaler and counter set to 4, and since that board is running at 72 MHz that means I'm triggering the DAC every 347 ns but it's supposed to have a max of 1 Msps.

Am I correct in assuming it's just ignoring those extra timer triggers?  Are there any error bits set when you "overdrive" a DAC like this?

 

1 ACCEPTED SOLUTION

Accepted Solutions
AScha.3
Super User

The DACs are

AScha3_0-1753268053591.png

So driving them faster than the given settling time produces no "error" , just the output signal quality gets worse.

AScha3_1-1753268481996.png

Only after settling time the output is at its final value, so driving it faster is no problem,

but signal is not as good any more.

 

The best qualtiy, as given in ds, you get by driving them at the max. speed, or slower.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

3 REPLIES 3

I don't think it's a physical limit, in terms of gears grinding, just that it lacks the dynamics / bandwidth to slew at higher rates.

So there's not going to be an error or status flags. It's your responsibility to get the factoring right in the TIM dividers, and keep it within range, and matching the sample rate of the data. If you saturate the DMA, then you might expect to see over/under flow type errors.

>>Am I correct in assuming it's just ignoring those extra timer triggers?

No, that would be an incorrect assumption.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
LCE
Principal II

For the G431 the datasheet says:

• 4 x 12-bit DAC channels
– 2 x buffered external channels 1 MSPS
– 2 x unbuffered internal channels 15 MSPS

So for the G431 it looks like it is an analog limitation, and should not be a problem to drive the DAC with the 2.x MSPS, as long as the signals are actually not changing to fast to cause problems for the analog output buffer.

AScha.3
Super User

The DACs are

AScha3_0-1753268053591.png

So driving them faster than the given settling time produces no "error" , just the output signal quality gets worse.

AScha3_1-1753268481996.png

Only after settling time the output is at its final value, so driving it faster is no problem,

but signal is not as good any more.

 

The best qualtiy, as given in ds, you get by driving them at the max. speed, or slower.

If you feel a post has answered your question, please click "Accept as Solution".