2011-02-25 02:14 PM
Difference between User Manual and .h file for GPIO setup
2011-05-17 05:25 AM
Can anyone clarify this for me?
The library typically uses the values it passes as a 32-bit vector, encoding more information than the single STM32 register, ie indexes, masks, shifts, states, etc. The library code interprets this, you should look at the library source to see what it actually does rather than assuming there is a simple one-to-one relationship.2011-05-17 05:25 AM
Perhaps a better solution would be for ST Micro to fix the Technical Reference Manual so that it explains that the ouput data register bit is used for the selection of the Pullup or Pulldown and that this bit needs to be set or cleared when programming the port pin.
Regards, Noel.2011-05-17 05:25 AM
The Reference Manual RM0008 Rev 11 clearly describes how the Port configuration register low / high set the GPIO bit configuration and mode. The Port output data register simply holds data which may be output if the pin's Alternate Function is not being used. The diagrams of the I/O port are quite clear.
If in doubt, look at the library functions and see which registers they affect or just use the library functions as demonstrated in the examples.