1、PA0~PA7、PC13、PC14、PC15 : 用于LCD模块(类似于1602) >> PA0~PA7的操作不会影响到PA8~PA15。但是PC13/14/15在这里的使用有待商榷:因为在DataSheet的Pin description表格后的注释有这么一段: “ PC13, PC14 and PC15 are supplied through the power switch and since the switch only sinks a limited amount of current (3 mA), the use of GPIOs PC13 to PC15 is restricted: only one I/O at a time can be used as an output, the speed has to be limited to 2 MHz with a maximum load of 30 pF and these I/Os must not be used as a current source (e.g. to drive an LED). ”
3、JTAG占用了不少IO口,这些口在什么样的条件下可以当普通IO口。 >> JTAG作为GPIO了,肯定牺牲调试功能。但是它们可以分时复用。在参考手册(V8.0)7.3.4章节有 “To optimize the number of free GPIOs during debugging, this mapping can be configured in different ways by programming the SWJ_CFG[1:0] bits ” 在ST官方的FwLib中有个例子就是如何将这几个调试口作为GPIO使用的。