cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between User Manual and .h file for GPIO setup

arthurg
Associate II
Posted on February 25, 2011 at 23:14

Difference between User Manual and .h file for GPIO setup

3 REPLIES 3
Posted on May 17, 2011 at 14:25

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.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
divner
Associate II
Posted on May 17, 2011 at 14:25

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.

John F.
Senior
Posted on May 17, 2011 at 14:25

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.