Arm Community
Site
Search
User
Site
Search
User
Groups
Arm Research
DesignStart
Education Hub
Graphics and Gaming
High Performance Computing
Innovation
Multimedia
Open Source Software and Platforms
Physical
Processors
Security
System
Software Tools
TrustZone for Armv8-M
中文社区
Blog
Announcements
Artificial Intelligence
Automotive
Healthcare
HPC
Infrastructure
Innovation
Internet of Things
Machine Learning
Mobile
Smart Homes
Wearables
Forums
All developer forums
IP Product forums
Tool & Software forums
Support
Open a support case
Documentation
Downloads
Training
Arm Approved program
Arm Design Reviews
Community Help
More
Cancel
Developer Community
Tools and Software
Software Tools
Jump...
Cancel
Software Tools
Arm Development Studio forum
Cortex M4 fetch Execute program counter functionning
Tools, Software and IDEs blog
Forums
Videos & Files
Help
Jump...
Cancel
New
Replies
3 replies
Subscribers
126 subscribers
Views
2265 views
Users
0 members are here
Related
Cortex M4 fetch Execute program counter functionning
Offline
Gaetan Clavel
over 7 years ago
Note: This was originally posted on 13th May 2013 at http://forums.arm.com
Hello,
I'm new on this forum and I would like to know some details about the execution of a program on a Cortex M4 ( in a STM32F407 microcontroller). I'm looking for this information because of my studies.
These are my questions :
First I would like to know if there is some kind of predictable execution of the code during the fetch & execute step? It 's quickly mentionned in the user manual and I also read some lines about this in the Cortex A documents but I would like to have some explainations.
I would also like to know how is the program counter (R15 register) functionning? There is a real physical counter which count from 0 to -- when a page is loaded from the flash memory (before to add the value with something else and to store that in R15)? I mean: when I'm reading a page from the flash memory there is a counter which counts 2 by 2 (because of the lengh of the Thumb mnemonics)? If I'm branching far enough to go on another page the counter would return to 0 ? How does it work?
In addition, from a programming point of view, can I choose to write a part of my code at a precise address of the flash memory, and so creating empty areas between 2 parts of code in the flash? Until know I'm writing a lot of "NOP" before to branch....
Finally, all the registers of the Cortex M4 ( R0 to R15 but also the peripheral registers ...) are physicaly situated at the same place? Or the peripheral register are physicaly situated near from the the corresponding peripheral on the chip?
Thank you very much for yours answers and your help!!!!
More questions in this forum
By title
By date
By reply count
By view count
By most asked
By votes
By quality
Descending
Ascending
All recent questions
Unread questions
Questions you've participated in
Questions you've asked
Unanswered questions
Answered questions
Questions with suggested answers
Questions with no replies
Not Answered
Forum FAQs
0
ARM Community
2521
views
0
replies
Started
1 month ago
by
Annie Cracknell
Not Answered
Use Arm DS5 streamline performance analyzer on TX2
0
1071
views
4
replies
Latest
4 days ago
by
ShirB
Not Answered
index are changing with the voltage apply to the adc
0
219
views
0
replies
Started
4 days ago
by
Vishal_Patel
Not Answered
Extended asm alternative for Arm Compiler 5 (memory barriers)
0
Memory Management Unit (MMU)
Arm Assembly Language (ASM)
Arm Compiler 5
226
views
0
replies
Started
6 days ago
by
StoneCold
Not Answered
Problem with arm_cmplx_mag_f32()
0
893
views
2
replies
Latest
12 days ago
by
Vishal_Patel
>
View all questions in Arm Development Studio forum