cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L071x8 GPIO configuration as analog input or input

DRamo.1
Associate II

Hello,

what is the difference between configuring GPIO pins from software and leave as default(no code).

does it have an impact on other register settings that are not being set/clear in default configuration.

because I am having a problem when I leave pin as an default(no code), if I do initialize(software based) then there is no problem.

Thank you!

5 REPLIES 5

> I am having a problem when I leave pin as an default

What problem? Which pin? Elaborate.

JW

TDK
Guru

> what is the difference between configuring GPIO pins from software and leave as default(no code).

If you leave it as default, the GPIO isn't touched from its reset settings. Normally this means the pin will be in high impedance input analog mode with no pullup/pulldown. However, pins used by SWD are an exception to this.

You can find the reset settings for individual GPIO pins in the reference manual.

If you feel a post has answered your question, please click "Accept as Solution".

0693W00000DnWaBQAV.pngdoes it mean it is in analog mode by default ?

Yes, corrected.

As stated in your other thread, if the GPIOx register settings are the same in both configurations, that's not the source of your problem. Registers tell the full story. Has to be a difference somewhere else.

If you feel a post has answered your question, please click "Accept as Solution".