2022-12-15 07:24 AM
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?
2022-12-15 07:34 AM
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.
2022-12-15 07:46 AM
I tried a simple ramping value, no change.
I'll take a look at that example.
2022-12-15 08:03 AM
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.
2022-12-15 08:25 AM
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.
2022-12-15 08:40 AM
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.
2022-12-15 09:07 AM
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.