This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

New to Programming STM32 ARM, unfamiliar with jargon words

Hi I am at a loss, i have some training with C++ but when it comes to jargon words, I am very confused as I cannot find references for them. It's very different from programming for program for PC, not program for chip.

I know when it comes to words for the constants and variables. I know where to look for declarations. But when it comes to words for hardware parts like
- GPIOB->ODR,
- TIM1->SR,
- and in any other projects

How on earth can I find their references or information?

Clement

Parents
  • "When using this method every register must be defined, and you'll get massive code overhead for i.e. UART1, UART2, UART3 and UART4, which all have the same offsets but different base addresses."

    Note that this is only an "overhead" in the source code - it puts absolutely no overhead whatsoever in the generated machine code!

    "This is easier and less code."

    Whether it's "easier" or not is a matter of opinion - which is why you'll find one method used in some places, and the other in other places.

    Again, "less code" is only less source text.

    "The '.' and the '->' are access methods for static and dynamic structures."

    No, that's not correct; it's not to do with "static" vs "dynamic" - it's whether you access the structure directly or indirectly (ie, via a pointer).
    But this is just standard C/C++ - nothing specifically to do with registers or embedded.

    Of course, dynamically-allocated things can never be directly accessed, so pointers always have to be used for dynamic things - but static things can be accessed either directly or indirectly.

    Register addresses are, of course, "static"!

Reply
  • "When using this method every register must be defined, and you'll get massive code overhead for i.e. UART1, UART2, UART3 and UART4, which all have the same offsets but different base addresses."

    Note that this is only an "overhead" in the source code - it puts absolutely no overhead whatsoever in the generated machine code!

    "This is easier and less code."

    Whether it's "easier" or not is a matter of opinion - which is why you'll find one method used in some places, and the other in other places.

    Again, "less code" is only less source text.

    "The '.' and the '->' are access methods for static and dynamic structures."

    No, that's not correct; it's not to do with "static" vs "dynamic" - it's whether you access the structure directly or indirectly (ie, via a pointer).
    But this is just standard C/C++ - nothing specifically to do with registers or embedded.

    Of course, dynamically-allocated things can never be directly accessed, so pointers always have to be used for dynamic things - but static things can be accessed either directly or indirectly.

    Register addresses are, of course, "static"!

Children