DAC doesn't work on my Nucleo stm32f446RE

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

User avatar
HDKLog
Posts: 45
Joined: Thu Aug 18, 2016 12:36 am
Has thanked: 1 time
Been thanked: 3 times

Re: DAC doesn't work on my Nucleo stm32f446RE

Post by HDKLog »

Yes all works like expected, I saw pull-up resistor 4.7k on board schematics so it go high and latched to the ground when button is pressed.
User avatar
tfAteba
Posts: 551
Joined: Fri Oct 16, 2015 11:03 pm
Has thanked: 91 times
Been thanked: 50 times

Re: DAC doesn't work on my Nucleo stm32f446RE

Post by tfAteba »

ok, I'm glad to hear that everything is working now even tough I didn't understand what was causing trouble at the beginning.
:D . How did you resolve the problem?
User avatar
HDKLog
Posts: 45
Joined: Thu Aug 18, 2016 12:36 am
Has thanked: 1 time
Been thanked: 3 times

Re: DAC doesn't work on my Nucleo stm32f446RE

Post by HDKLog »

I started from learning board schematic to have full Image of whats going on.The button logic vary from board to board: pin can be attached to pull-up resistor and button to ground and when it will be pressed, it will connect pin to ground cause it go LOW. Another version is where pin attached to pull-down resistor and button to VCC and when it will be pressed the pin voltage will go up to HIGH.

PULL-UP-and-PULL-DOWN-Resistors.jpg


Schematic of my board (NUCLEO 64 STM32f446RE) shows that my pin attached to pull-up resistor so when button is not pressed its state is HIGH and when button will be pressed it will go down. In example testhal / STM32 / STM32F4xx / DAC / in while loop of main function if condition will be TRUE when button isnt pressed so you need to reverse its logic to make it work right, thats it.
User avatar
tfAteba
Posts: 551
Joined: Fri Oct 16, 2015 11:03 pm
Has thanked: 91 times
Been thanked: 50 times

Re: DAC doesn't work on my Nucleo stm32f446RE

Post by tfAteba »

Yes I already understand that with your last explanations:
Yes all works like expected, I saw pull-up resistor 4.7k on board schematics so it go high and latched to the ground when button is pressed.


What I didn't understand it is the problem with your first program that you post to ask help.
I didn't see any switch button used in that code so it would work for me. Any way, you have resolve your problem, that the most important :D .
Post Reply