English
Language : 

AN2710 Datasheet, PDF (24/30 Pages) STMicroelectronics – Safe GPIO port configuration in STR7xx devices
Recommended configuration sequence
AN2710
Table 29.
PC2 - 0
PC1 - 0
PC0 - 1
Input pull-up/pull-down to Input
No change
Input
No change
Table 30.
PC2 - 1
PC1 - 0
Input pull-up/pull-down to output open drain
Alternate function push-pull(1)
Output push-pull(2)
PC0 - 0
Output open drain
1. Glitch possible if the alternate function is a test function.
2. Glitch possible if OUTPUT=1 with no external pull-up.
Alternatively, the following sequence can be used:
Table 31.
PC0 - 0
PC1 - 0
PC2 - 1
Alternate Input pull-up/pull-down to output open drain sequence
Reserved
Analog input
Output open drain
Table 32. Input pull-up/pull-down to output push-pull
PC2 - 1
Alternate function push-pull(1)
PC1 - 0
Output push-pull
PC0 - 1
No change
1. Glitch possible if alternate function is a test function.
Alternatively, the following sequence can be used:
Table 33.
PC0 - 1
PC1 - 0
PC2 - 1
Alternate sequence: Input pull-up/pull-down to output push-pull
No change
Input
Output push-pull
Table 34. Input pull-up/pull-down to alternate function open drain
PC2 - 1
Alternate function push-pull(1)
PC1 - 1
No change
PC0 - 0
Alternate function open drain
1. Glitch possible if alternate function is a test function and if OUTPU=1 with no external pull-up.
Alternatively, the following sequence can be used:
Table 35.
PC0 - 0
PC1 - 1
PC2 - 1
Alternate sequence: Input pull-up/pull-down to alternate function open
drain
Reserved/Input
No change
Alternate function open drain
24/30