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?
Best Regards,
Aaron
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