0
\$\begingroup\$

Second image illustrates the process of interrupt service entry in ARM TM123GH6PM (using GPIO port C as an example), as you see, it took the vector address of port C handler and put it in PC (you can know it is the vector address of port C handler from the first image).

Isn't the PC supposed to hold the value of the port C handler address itself ? or it first holds the vector address then when it fetches the port C handler address from it, it changes the PC to the address of port C handler ?

vector table interrupt entry

\$\endgroup\$
  • \$\begingroup\$ i think that address 48 contains a jump instruction \$\endgroup\$ – jsotola Jan 9 '18 at 6:57
3
\$\begingroup\$

The PC is never loaded with the value 0x00000048. The second image shows

PC = {0x00000048}

which is their way of saying (using the { and } characters) that the PC is loaded with the contents of memory location 0x00000048. The result is that the processor jumps straight to the start of your service routine.

That's also why the first image shows "Vector location" at the top of the column rather than "Handler address" or something similar.

By the way, the full correct part number for your device is TM4C123GH6PM.

You can find the manufacturers data sheet here.

\$\endgroup\$
0
\$\begingroup\$

I get no exact matches searching for your part number, but it appears to be Cortex-M4 based. This is ARMv7M architecture, where the vector table is a list of addresses (not an instruction to execute as in the classic ARM exception model).

The value at 0x00000048 will be loaded (by the NVIC) and used as the PC value. Your images don't show the actual interrupt handler. Note that the vectors need to have bit [0] set (this is used as the T-bit when loading the PC, and this core can only execute in Thumb state).

Up until the time that the instruction pointed to by the value at 0x00000048 has been fetched, the interrupt can potentially be pre-empted by another higher priority interrupt.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.