issue of PT23_Getval() in BitsIO

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

issue of PT23_Getval() in BitsIO

1,106件の閲覧回数
aaronlee
Contributor V

Hi,

We use S12ZVCA and CodeWarrior for MCU v11.1.

[main.c line 188]

bTurnStatus_Temp = PT23_LeftRight_GetVal(); // Get PT2 & PT3 value (SCI1 & SCI2 abnormal)

It's highly unstable Transmit/Receive in SCI1 &SCI2  if we use the Getval().

[main.c line 187]

bTurnStatus_Temp = (PTT & 0x0C) >> 2; // Get PT2 & PT3 value (SCI1 & SCI2 work fine)

We use line 187 to instead of GetVal(). It works fine. Why?

  • SCI0, 115200,n,8,1
  • SCI1 9600,n,8,1
  • SCI1 sent "$D1,00,000#" immediately when SCI0 received 0xA0 10 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 DE

Best Regards,

Aaron

タグ(2)
0 件の賞賛
返信
1 返信

966件の閲覧回数
lama
NXP TechSupport
NXP TechSupport

Hi,

I do not think the issue is the code you mentioned.

If you disassemble the code for both of them you will see the only difference in the shift right.

The issue, in my opinion, is a traffic jam and data processing time. Have you checked overun error?

It can happen that if you use interrupt communication then there is no time to serve other interrupt request because of current interrupt processing.

Could you please try to decrease sending period and perform tests.

Best regards,

Ladislav

0 件の賞賛
返信