Posted on October 25, 2017 at 06:56The original post was too long to process during our migration. Please click on the attachment to read the original post.
When I set update rate to 500ksps, I get triangular wave which has uneven slope. Can anyone tell me what should I do to resolve this and what should I do to get my code running as desired?
Reduce output rate. You ignored the settling time of the DAC, i.e. it's bandwidth.
Check for the DAC maximum slew rate, activate the output buffer and remember to check the output signal without loading the output too much (a follower op-amp would simplify things before optimizing).
On my side, I usually use a Timer output compare pin and feed it through the DAC trigger input pin. This way, I can manually play with a jumper wire and debug the DAC manually. If later using ADC, they too uses a different input trigger pin, so it is possible to tune ADC/DAC sampling skew.