To answer crasyCat.
MC9S12XDP512MAG is the processor with
CodeWarrier IDE 5.7
Freescale HC12,HC12x,HCS12x version 4.5
To Answer Lundin reply. Yes have thought of the bit field and therefore changed it to a uchar as it would use that amount of visical memory anyway.
This had no effect.
To perplex it even further if cOutPointer is decleared at 0x281A then the code works but if it is at location 0x36A2 it dosnt work.
Removing the volatile as the whole structure is decleared volatile seemed to allow a memory location of 0x36A2 to work as well also the bit field is deleared as an unsigned char unsigned int is no different.
I shell try and set it up with bit masks and see what happens.
Thanks for your surgestions