wovo / hwlib

C++ OO micro-controller library for close-to-the-hardware programming
Boost Software License 1.0
57 stars 26 forks source link

stm32f103 says it is normaly configured as pull up but im not convinced that is the case. #39

Open CvRXX opened 3 years ago

CvRXX commented 3 years ago

The documentation tells us this:

/// This constructor sets the pin direction to input.
/// By default, the internal weak pull-up is enabled.

The mode cnf wil be set to 1000. image

But as can be seen in above image this depends on the PxODR register. So if it was an output before and it was put low it will be a pull down.

CvRXX commented 3 years ago

@wovo Am I right?