embedded - PC value in between two instructions (program counter) -


trying understand cause of watchdog. snippet of assembly routine follows:

fe813cf0:       2820            cmp     r0, #32 fe813cf2:       dbf0            blt.n   fe813cd6 <xyz+0x10> fe813cf4:       f04f 30ff       mov.w   r0, #4294967295 ; 0xffffffff fe813cf8:       bd10            pop     {r4, pc} 

my pc value dump fe813cf3. mean? how should interpret it? please let me know if more info required.

if it's watchdog triggers, seems indicate processor has hung. state you're capturing might corrupt, in worst case. not sure how "dump", it's hard tell.

in general on arm, odd address indicates jump wanted switch thumb instruction set.

see instance this documentation of bx (branch exchange) instruction:

the bx instruction branches address contained in specified register. value of bit 0 of branch address determines whether execution continues in arm state or thumb state.

bit 0 of address can used in way because:

  • all arm instructions word-aligned. means bits 0 , 1 of address of arm instruction ignored because these bits refer halfword , byte part of address.

  • all thumb instructions halfword-aligned. means bit 0 of address of thumb instruction ignored because refers byte part of address.

however, i'm pretty sure above implies pc never set odd address, bit 0 cleared branch instruction.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -