cancel
Showing results for 
Search instead for 
Did you mean: 

DAC not responding

Alexmouse
Senior

I'm using the STM32H745I-DISCO board.

I'm trying capture on the ADC and feed straight out on the DAC, triggered by a timer.

The timer is working, and the ADC is getting data that looks sensible.

I can see data reaching the DAC data register, but the output is sitting at rail.

My signals are:

ADC1 IN0 PA0_C T1 Arduino connector CN7 pin3

DAC1 OUT1 PA4 U3 STMOD connector P1 pin13

I'm calling HAL_DAC_Start(&hdac1, DAC_CHANNEL_1);

at startup, then

HAL_DAC_SetValue(&hdac1,DAC1_CHANNEL_1,DAC_ALIGN_12B_R,(uint32_t)Sample_ADC)

I've tried various options in CubeMX without success.

7.2. DAC1 - OUT1 connected to: only external pin

Initialized Context: Cortex-M7

DAC Out1 Settings:

Mode selected Normal Mode

Output Buffer Enable

Trigger None

User Trimming Factory trimming

Did I miss something?

6 REPLIES 6
RomainR.
ST Employee

Hello Alexmouse (Community Member),

Are you able to drive DAC OUT1 with a know static code that you could easily measure ?

Could you try Cube_FW_H7 DAC example: \STM32Cube\Repository\STM32Cube_FW_H7_V1.10.0\Projects\STM32H745I-DISCO\Examples\DAC\DAC_SignalsGeneration1 ?

Best regards,

Romain,

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Alexmouse
Senior

I tried a simple ramping value, no change.

I'll take a look at that example.

I ran that example (CM7 DAC_SignalsGeneration), and have the scope on STMOD connector P1 pin13, DAC1 OUT1 PA4.

The output is still sitting at ~Vcc.

I found it.

Socket P1, I assumed the usual zigzag pin order.

However, it is pinned as per the schematic, along the first row then the second row.

Studying the Gerbers, I found the correct pin.

I have the sawtooth test signal, now I need to try my own code again.

Alexmouse
Senior

Socket P1, I assumed the usual zigzag pin order.

However, it is pinned as per the schematic, along the first row then the second row.

Studying the Gerbers, I found the correct pin.

RomainR.
ST Employee

Hi Alexmouse 

It's a good news, yes STMOD+ connector pinout are even and odd ordered.

If you see sawtooth signal from example, you should be very close to the goal.

Best regards

Romain,

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.