Maybe i missed something (i am new here) but am i wrong or i can t use some of the nice features of the stm32 like the pulldown input?
I would like to add this: pinMode(pin, INPUT_PULLDOWN)
Another function i would like to add is to choose the speed of gpio for example pinMode(pin, OUTPUT, LOWSPEED)
Maybe more experienced people than me tried and it is not simple,so i thought to write here before trying it
Tell me and i will try then i post the code here
Maybe i missed something (i am new here) but am i wrong or i can t use some of the nice features of the stm32 like the pulldown input?
I would like to add this: pinMode(pin, INPUT_PULLDOWN)
Another function i would like to add is to choose the speed of gpio for example pinMode(pin, OUTPUT, LOWSPEED)
Maybe more experienced people than me tried and it is not simple,so i thought to write here before trying it
Tell me and i will try then i post the code here
See available modes in RM0008 chapters 9.2.1, 9.2.2:
CNFy[1:0]: Port x configuration bits (y= 0 .. 7)
These bits are written by software to configure the corresponding I/O port.
Refer to Table 20: Port bit configuration table.
In input mode (MODE[1:0]=00):
00: Analog mode
01: Floating input (reset state)
10: Input with pull-up / pull-down
11: Reserved
http://wiki.stm32duino.com/index.php?ti … #Pin_Modes
and about the speed, what would be the advantage in being able to define that? atm it defaults to the highest speed i think, is there any reason we would want it differently?
I tried it yesterday and it didn t worked, for sure i wrote it wrong
Yep about the speed it is not so usefull except for power saving application (not my case)
The wiki should be corrected as well.


The wiki should be corrected as well.
stevestrong wrote:You cannot activate only the built-in pull-down resistor separately from the pull-up resistor.
See available modes in RM0008 chapters 9.2.1, 9.2.2:
CNFy[1:0]: Port x configuration bits (y= 0 .. 7)
These bits are written by software to configure the corresponding I/O port.
Refer to Table 20: Port bit configuration table.
In input mode (MODE[1:0]=00):
00: Analog mode
01: Floating input (reset state)
10: Input with pull-up / pull-down
11: Reserved
stevestrong wrote:You cannot activate only the built-in pull-down resistor separately from the pull-up resistor.
See available modes in RM0008 chapters 9.2.1, 9.2.2:
CNFy[1:0]: Port x configuration bits (y= 0 .. 7)
These bits are written by software to configure the corresponding I/O port.
Refer to Table 20: Port bit configuration table.
In input mode (MODE[1:0]=00):
00: Analog mode
01: Floating input (reset state)
10: Input with pull-up / pull-down
11: Reserved

Just that I have never seen an example where this is used.
Has anyone tried this out?
Is this working also in combination with GPIOx_BSRR register values?

Just that I have never seen an example where this is used.
Has anyone tried this out?
Is this working also in combination with GPIOx_BSRR register values?
