hey so I'm having some trouble understand 3 fairly simple lines of code configuring some port D pins i know somehow they are supposed to make pins 0-3 and 8-15 as 2MHz low speed outputs with a pull-up resistor on pin 0 but after looking thru the c and h files I'm just not sure how to get to that conclusion can someone help me out please?
GPIO->OSPEEDR = 0xFF00; GPIO->PUPDR = 0x1; GPIO->MODER = 0x5555;
Thank you!
Let me guess, some STM32 series part?
Ok, figure out what part you're using and download a copy of the Reference Manual for it, there will be a section describing the GPIO peripheral registers, and the bit settings thereof.
yes STM32F4 and which section would you recommend?
from the post above there will be a section describing the GPIO peripheral registers
Someone who haven't worked with this processor before might even suspect that maybe a search for "OSPEEDR" in such a processor datasheet/user manual might actually find some nice paragraph or table that does describe the meaning of such a register.
It isn't dangerous to spend a bit of time looking through the documentation that the chip vendors spends quite a lot of time writing.
RM0090 Rev 6 www.st.com/.../DM00031020.pdf
Well there's the whole of Chapter 8, about GPIO
And this section 8.4 "GPIO Registers" bit around page 278 that would appear particularly salient.