Solved! Go to Solution.
Can you show this code? Does the compiler do 16 bit access for every 2 byte address update?
jkampmann wrote:
Yes, that's right. I'm using far pointer.
Using "-CpGPAGE=0x10" Doesn't seem to have any effects.
I was using "#pragma TRAP_PROC SAVE_ALL_REGS" instead.
But all this has no effect on this behaviour. Only every second byte is written. When i'm using the debugger i can clearly see that the external ram was accessed, but only every second byte.
I don't think the compiler does this intentionally. The use pattern of the code may be different for the two uses and that may cause the different code seen.
I think outside the interrupt routine the compiler is saving the lower/higher byte while accessing the 16 bit RAM 8-Bit byte-wise...
Hmmm. This question is a bit unexpected. Basically the _STORE_FAR_8 routine is not used when generating code for the S12X, only when generating code for the S12. Does your code use _STORE_FAR_8?
btw can somebody explain to me what "_STORE_FAR_8" in datapage.c is doing ? Has this to do with this ?
Can you show this code? Does the compiler do 16 bit access for every 2 byte address update?
jkampmann wrote:
Yes, that's right. I'm using far pointer.
Using "-CpGPAGE=0x10" Doesn't seem to have any effects.
I was using "#pragma TRAP_PROC SAVE_ALL_REGS" instead.
But all this has no effect on this behaviour. Only every second byte is written. When i'm using the debugger i can clearly see that the external ram was accessed, but only every second byte.
I don't think the compiler does this intentionally. The use pattern of the code may be different for the two uses and that may cause the different code seen.
I think outside the interrupt routine the compiler is saving the lower/higher byte while accessing the 16 bit RAM 8-Bit byte-wise...
Hmmm. This question is a bit unexpected. Basically the _STORE_FAR_8 routine is not used when generating code for the S12X, only when generating code for the S12. Does your code use _STORE_FAR_8?
btw can somebody explain to me what "_STORE_FAR_8" in datapage.c is doing ? Has this to do with this ?