Login

Important information

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

ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.

ARM Community: ARM7TDMI processor mode - ARM Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

ARM7TDMI processor mode Rate Topic: -----

#1 User is offline   shan s 

  • Member
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 23-November 12

Posted 23 November 2012 - 04:46 AM

I am using the ATMEL91SAM7SE512 controller with ARM7TDMI processor.The application is running in the User mode .

when the interrupt(IRQ) occurs processor must switch to IRQ mode,then it should go to the IRQ handler routine.

here application developer part is to tell the IRQ handler address only.so who taking the responsibility to change from User mode to IRQ mode.

whether the core itself switched into IRQ mode using hardware setup or some low level routines(program) avail.i struck in this point , i cant

proceed further on this study of ARM7TDMI processor.


please tell me your thoughts regarding this query.


thanks
shan.s




This post has been edited by shan s: 26 November 2012 - 06:19 AM

0

#2 User is offline   ttfn 

  • Super Contributor
  • PipPipPipPip
  • Group: Members
  • Posts: 576
  • Joined: 29-September 06

Posted 26 November 2012 - 09:42 AM

Assuming that interrupts are enabled (CPSR.I=0) the processor will automatically switch to IRQ mode when the IRQ is signaled. It will also automatically start executing from the IRQ entry in the vector table.

It is up to the boot code to make sure the vector table is in place, with the correct handlers set up.
0

#3 User is offline   isogen74 

  • Super Contributor
  • PipPipPipPip
  • Group: Members
  • Posts: 1098
  • Joined: 20-March 07

Posted 26 November 2012 - 10:56 AM

I'd highly recommend the ARM System Developer's Guide book if you are interested in any of this low level platform setup; I always a copy open on my desk!
When optimizing software, consider that the quickest code to run is the bit you removed from the call path.
1

#4 User is offline   shan s 

  • Member
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 23-November 12

Posted 26 November 2012 - 11:30 AM

View Postttfn, on 26 November 2012 - 09:42 AM, said:

Assuming that interrupts are enabled (CPSR.I=0) the processor will automatically switch to IRQ mode when the IRQ is signaled. It will also automatically start executing from the IRQ entry in the vector table.

It is up to the boot code to make sure the vector table is in place, with the correct handlers set up.




Hi,
Thanks for ur answer. it is fine that in boot program we are filling the exception vectors.
may i know about exception entry and exception exit code.they given the exception entry and
exception exit code (ASSEMBLY) in ARM7TDMI processor architecture document.it is not in
my project code( Boot program(startup.s) + application program).simply we cant assume that mode
switch were happened and interrupt handler routine is called.


thanks
shan.s
0

#5 User is offline   shan s 

  • Member
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 23-November 12

Posted 26 November 2012 - 11:43 AM

View Postisogen74, on 26 November 2012 - 10:56 AM, said:

I'd highly recommend the ARM System Developer's Guide book if you are interested in any of this low level platform setup; I always a copy open on my desk!



Hi,
I am really confused in the below mentioned thing.

Let take
Current Mode = User mode;
Exception occur = IRQ;

Exception entry:
when the IRQ occurs , have to copy the CPSR of user mode(current) to SPSR_irq.
load the PC with irq exception vector address and load the return address of the User
program into LR_irq.then we have to change the mode in the CPSR.

Exception leaving:
On leaving , have to copy the PC with the LR_irq and change the mode the CPSR to User mode.


doubts in Exception entry:
=====================

1. Here they are accessing the SPSR_irq before moving the processor to the IRQ mode.
How this is possible.because in user mode it is not possible access the SPSR registers of
other exception modes.
2. i think the address value of CPSR = 16.what is the address value of SPSR(irq,fiq,svr.....).

can i get the any PDF of ARM System Developer's Guide book .author name pls.


thanks
shan.s








1

#6 User is offline   ttfn 

  • Super Contributor
  • PipPipPipPip
  • Group: Members
  • Posts: 576
  • Joined: 29-September 06

Posted 26 November 2012 - 03:44 PM

I think what you missing is that these steps (CPSR -> SPSR_irq, updating the CPSR and branching to the vectors) are ALL AUTOMATIC. That is the hardware does it for you when it recognizes the IRQ exception.

So you are correct - the User mode software would not be able to perform these steps. But that does not matter, as it is the hardware that is taking care of it.
1

#7 User is offline   shan s 

  • Member
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 23-November 12

Posted 27 November 2012 - 04:59 AM

View Postttfn, on 26 November 2012 - 03:44 PM, said:

I think what you missing is that these steps (CPSR -> SPSR_irq, updating the CPSR and branching to the vectors) are ALL AUTOMATIC. That is the hardware does it for you when it recognizes the IRQ exception.

So you are correct - the User mode software would not be able to perform these steps. But that does not matter, as it is the hardware that is taking care of it.



Thank you so much....

doubts:
========

1. mode switching for all the exceptions are automatic by the Hardware... am i correct?

2. ARM7TDMI processor only i know (little bit).i want learn RTOS. is it possible to
learn using FreeRTOS in this processor? or we have to chose some higher
level processor ARM.

3. i have gone through some API in FreeRTOS.tell some the development kit using this processor to learn RTOS.
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic