cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F405 DAC channel 2 not working

NBenn.1
Associate II

Hi,

I've created a custom board with the STM32F405RGT6. I am trying to simultaneously send two sinewaves (90 deg out of phase) from the two dac channels to an IQ modulator chip. The DAC is set up to have data given to them via DMA (DMA streams 5 and 6). Both channels of the DAC are currently set up with timer 8 trigger output as the trigger event, although ideally I would like to change that to timer 2 later.

The problem right now is that for some reason, only DAC channel 1 is sending out a sine wave, while DAC channel 2 is doing strange things - sometimes the signal I get is just at ground, sometimes it is like a small constant signal (like 10s of mV), and sometimes I get like a weird wave.

The thing is, both DAC outputs have identical configurations I believe (configuration in cubeMX attached). I have checked the hardware and there are no problems (both output pins are connected to the correct pin on the MCU, neither of them are shorted to ground or anything.

Also, I've seen these signals both working at some point earlier on in my project, and I haven't changed any code to do with the DAC. Is there anything that you guys have come across before/any issues in my hardware setup?

(I am also using DMA to read data from two ADCs by the way, so four DMA streams in total - thought this might be relevant).

2 REPLIES 2

Read out and check/post the DAC and relevant DMA registers content. You may also want to read out and check/post the relevant GPIO registers content.

JW

Georgy Moshkin
Senior II

have you checked DAC output with a scope? If you use ADC to "loopback" the DAC output it may be ADC problem, because MX_ADC1_Init is before DMA init in your code, so you do not see correct data on that channel (ADC1 probably not working).

Disappointed with crowdfunding projects? Make a lasting, meaningful impact as a Tech Sponsor instead: Visit TechSponsor.io to Start Your Journey!