Keil Logo

Read /write on rcc clock register

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
Ark P
Posted
9-Aug-2018 08:10 GMT
Toolset
ARM
New! Read /write on rcc clock register

Hey geeky folks, I am facing the issue in writing the values on RCC clock configuration register. Which would be more efficient? direct binary writings, using pointers, bit fields. I don't understand how to write on RCC register because just now I am getting started with arm and Keil. so kindly help me out, folks.

Read-Only
Author
Andrew Neil
Posted
9-Aug-2018 10:43 GMT
Toolset
ARM
New! RE: I am getting started with arm and Keil

http://www2.keil.com/mdk5/learn

http://www.keil.com/books/

http://www.keil.com/support/

Read-Only
Author
Andrew Neil
Posted
9-Aug-2018 10:47 GMT
Toolset
ARM
New! RE: RCC

Reference to RCC suggests you are using an STM32 ?

That's an ST product - unrelated to Keil.

So, for specific details about the STM32, you need to consult the ST documentation:

http://www.st.com/stm32

Read-Only
Author
Ark P
Posted
9-Aug-2018 12:01 GMT
Toolset
ARM
New! RE: RCC

yeah, I'm using STM32f427. thanks for your support, Mr. Andrew.

Read-Only
Author
Andrew Neil
Posted
9-Aug-2018 12:26 GMT
Toolset
ARM
New! RE: I'm using STM32f427.

So your starting point for product-specific info is here:

https://www.st.com/en/microcontrollers/stm32f427-437.html

Note the links at top-right to:
Tools & Software
Resources
Support & Community

https://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus.html

https://www.st.com/content/st_com/en/support/learning/stm32-education.html

Cortex-M4 in general:
The Definitive Guide to ARM® Cortex®-M3 and Cortex®-M4 Processors
by Joseph Yiu
http://www.amazon.com/Definitive-Guide-Cortex%C2%AE-M3-Cortex%C2%AE-M4-Processors/dp/0124080820/ref=sr_1_1?ie=UTF8&qid=1435751961&sr=8-1&keywords=The+Definitive+Guide+to+the+ARM+Cortex

Read-Only
Author
Westonsupermare Pier
Posted
9-Aug-2018 14:00 GMT
Toolset
ARM
New! RE: Read /write on rcc clock register

>>Which would be more efficient?

A single load/store would be the most efficient.

For the optimizer to be able to work you'd need to load the content into a temporary variable (register) manipulate it there, and then store it back.

Read-Only
Author
Andrew Neil
Posted
9-Aug-2018 15:00 GMT
Toolset
ARM
New! RE: Which would be more efficient?

Typically, RCC is likely to be something that you'd set once at startup, and not change (much) during operation - so not much point spending time agonising about "efficiency" here.

ST - as other manufacturers - provides definitions to easily access their registers.
Just use them.

Only if you have very specific requirements that really can't be met via the standard definitions provided should you start trying to micro-manage stuff like this.

As the old saying goes,

"Premature optimisation is a root of all kinds of evil"

Read-Only
Author
Andrew Neil
Posted
9-Aug-2018 15:31 GMT
Toolset
None
New! RE: Premature optimisation is a root of all kinds of evil

http://wiki.c2.com/?PrematureOptimization

Next Thread | Thread List | Previous Thread Start a Thread | Settings

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.