MC9S08PA4 warning

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,141件の閲覧回数
mikee_
Contributor I

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.

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,045件の閲覧回数
tonyp
Senior Contributor II

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.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,046件の閲覧回数
tonyp
Senior Contributor II

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.

0 件の賞賛
返信
1,045件の閲覧回数
mikee_
Contributor I

Thank you so much.

you were right !!

0 件の賞賛
返信