Arm Community
Site
Search
User
Site
Search
User
Groups
Research Collaboration and Enablement
DesignStart
Education Hub
Innovation
Open Source Software and Platforms
Forums
AI and ML forum
Architectures and Processors forum
Arm Development Platforms forum
Arm Development Studio forum
Arm Virtual Hardware forum
Automotive forum
Compilers and Libraries forum
Graphics, Gaming, and VR forum
High Performance Computing (HPC) forum
Infrastructure Solutions forum
Internet of Things (IoT) forum
Keil forum
Morello Forum
Operating Systems forum
SoC Design and Simulation forum
中文社区论区
Blogs
AI and ML blog
Announcements
Architectures and Processors blog
Automotive blog
Graphics, Gaming, and VR blog
High Performance Computing (HPC) blog
Infrastructure Solutions blog
Innovation blog
Internet of Things (IoT) blog
Operating Systems blog
Research Articles
SoC Design and Simulation blog
Tools, Software and IDEs blog
中文社区博客
Support
Arm Support Services
Documentation
Downloads
Training
Arm Approved program
Arm Design Reviews
Community Help
More
Cancel
Support forums
Arm Development Studio forum
Cortext M3 Program Counter
Jump...
Cancel
Locked
Locked
Replies
3 replies
Subscribers
121 subscribers
Views
2194 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
How was your experience today?
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
Cortext M3 Program Counter
Offline
Muhammad Ahsan
over 9 years ago
Note: This was originally posted on 21st March 2011 at
http://forums.arm.com
Hello all,
I am using Cortex M3 (which support only Thumb-2 Instruction Set). I want to let the PC to jump to a particular address. When I try to use PC as destination register to move the address in the PC, a fault exception occurs. I have read the Ref. Manual but could not find any restrictions that may apply on PC. I am using IAR IDE. Any help would be highly appreciated.
Offline
Muhammad Ahsan
over 9 years ago
Note: This was originally posted on 22nd March 2011 at
http://forums.arm.com
The addresses where I want PC to jump have anding 0x..5 and 0x...A, which i assume are odd. While reading I also came across that the address should be word aligned, which means ending of address should be 0, 4, 8, or C. I also read that the bit 0 of the address where the PC should jump must be 1, which is contradiction with the earlier statement. Either I am not understanding it properly or there is some mistake. Anybody has any explaination of it?
Make sure the address is odd.
Cancel
Up
0
Down
Cancel
Offline
Peter Harris
over 9 years ago
Note: This was originally posted on 22nd March 2011 at
http://forums.arm.com
Instructions for ARM instructions must be word aligned in memory, and for Thumb instructions they must be half-word aligned.
When used in the PC the LSB of the register is not part of the address, but encodes mode to set on the branch. For Thumb it should be one, and for ARM should be zero.
Iso
Cancel
Up
0
Down
Cancel
Offline
Marcus Harnisch
over 9 years ago
Note: This was originally posted on 22nd March 2011 at
http://forums.arm.com
Make sure the address is odd.
Cancel
Up
0
Down
Cancel