Re: How to check the state of the Epiphany from the ARM
Posted:
Fri Mar 07, 2014 1:56 am
by ysapir
Remember that you can (should?!) use the symbolic names for the registers you access. For example, instead of using the absolute address 0xf0404 for accessing the STATUS register, use the symbolic name E_REG_STATUS. A list of defined names can be found at the chapter 14 (e-HAL) of the Epiphany SDK Reference manual.
Re: How to check the state of the Epiphany from the ARM
Posted:
Thu Jun 19, 2014 2:01 am
by aolofsson
If the program you ran ended with a normal "exit" then, you would end up with a trap instruction, the way the crt0 is currently implemeted. This does put the core in a halted state (DEBUGSTATUS register) but not in an idle STAT( STATUS[0] bit). If you want to specifically put the core in an idle state, then you would need to execute an "idle" instruction in your program. There are some examples where we do this instead of exiting from main. With respect to the disclaimer about reading the GP registers..this is fine to do in an IDLE state as well as in a HALTED state.
Andreas