2024-01-26 08:09 AM
Im working on STM32F401CB microprocessor and im trying to read potentiometer value and according to the value turn on the led.Thats my aim but i think that i cannot read the value of pot because my led is not turning on any condition.I have used pa0 as analog input and pb0 as general purpose output.My ADC converted variable is potentiometer_value which is a 16bit variable because of i make a adc process in 12 bit resolution.I am trying to read adc converted potentiometer value with the read_adc function but my led is not turning on anyway,as a proof of that my if else condition is potentiometer value>0 but it still does not turn on.
I have linked my proyeus schematic down below.
My atollic code is this:
Do you have an idea where does this error come from?
2024-01-26 08:26 AM
Hello,
Just wondering why you're still using the old FW library of F4? it's obsolete.
You can migrate to STM32CubeF4. Also you can use STM32CubeMx tool to initialize your peripherals.
2024-01-26 09:18 AM
what is the relation between my complaint and that?
2024-01-26 09:36 AM
It was a note and we are no more supporting this library. So if you are looking for ST support I suggest to use the new library.
2024-01-26 09:43 AM
Step through the code and verify GPIOB registers are being modified as expected.
Probably they are, and that you're either (a) misinterpreting data or (b) pin isn't connected how you think or (c) pin is being driven by something else.
2024-01-26 10:58 AM
Are you talking about HAL library?