In STM32 Standard Peripheral library, we need to configure the GPIO.
But there are 3 functions which I not sure how to configure them;
In the GPIO_Speed, there are 4 settings to pick from
GPIO_Speed_2MHz /*!< Low speed */ GPIO_Speed_25MHz /*!< Medium speed */ GPIO_Speed_50MHz /*!< Fast speed */ GPIO_Speed_100MHz
How do I know which speed do I choose from? Is there any advantage or disadvantages using high speed or low speed? (eg: power consumption?)
In the GPIO_OType, there are 2 settings to pick from
GPIO_OType_PP // Push pull GPIO_OType_OD // Open drain
How to know which to choose from? and what is open drain and push pull?
In the GPIO_PuPd, there are 3 settings to pick from
GPIO_PuPd_NOPULL // No pull GPIO_PuPd_UP // Pull up GPIO_PuPd_DOWN // Pull down
I think this settings is related to initial setting of push pull.