Hello,
I am getting this strange warning every time I compile my code.
In my code I start by Initialization section when I configure the PORT registers as follows.
BCLR 0,PORT_PTAOE | ; Output disabled |
BSET 0,PORT_PTAIE | ; Input Enabled |
I am using Freescale Codewarrioe 10.6 and the compilor does not seem to like something about my code. I get the following warning for each line in my code where I try to configure a register.
The warning is the following: A13003 Value is truncated to one byte.
Any help?
Many thanks
M.
已解决! 转到解答。
Check the values for the PORT_PTAOE and PORT_PTAIE symbols.
If they are not in zero page (i.e., have an MSB of zero) then you cannot use the BSET/BCLR instructions. You will have to use a LDA/ORA/STA (BSET) or LDA/AND/STA (BCLR, using inverted mask) sequence instead.
Check the values for the PORT_PTAOE and PORT_PTAIE symbols.
If they are not in zero page (i.e., have an MSB of zero) then you cannot use the BSET/BCLR instructions. You will have to use a LDA/ORA/STA (BSET) or LDA/AND/STA (BCLR, using inverted mask) sequence instead.