AnsweredAssumed Answered

Exception Stack Frame MCF5216 / CodeWarrior 6.4

Question asked by DaveTonyCook on Jul 11, 2013
Latest reply on Jul 11, 2013 by TomE

In the programmers ref man. Page 11-4 sec 11.1.2 Exception Stack Frame definition shows the stack frame format as:

 

FORMAT/ FS[3-2]/ VEC/ FS[1-0]/ STATUS REG

 

However, the boiler plate code supplied with the ARC evaluation kit for the M5282EVB development board v2.2.0 implements the exception stack frame as:

 

FS/ Fmt/ Vector/ FS/ STATUS REG

 

So my question is... which is correct? Anyone know ;0)

 

Further:

 

The macro

 

#define MCF5200_RD_SF_VECTOR(PTR)   \

      ((*((uint16 *)(PTR)) >>  2) & 0x00FF)

 

would get at bits 2 & 4 of the status register in any case, surely it should be:

 

#define MCF5200_RD_SF_VECTOR(PTR) \

( (uint16 *) ( *(PTR) >>  18) & 0x00FF) )

 

to get at bits 18 to 25 of the VEC byte??

 

The tool chain is CodeWarrior 6.4

 

Any help would be appreciated. Thanks

 

Outcomes