<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Hello,<br><br>I am using EL9800 evaboard. However, there's an error with my UART communication.<br>I used UART2, and if I restart the board (power on/off), the program works. But for the next time, the EtherCAT communication does not work. I think this is because of the interrupt conflict between EtherCAT and UART.<br>Can anyone explain me?<br><br>Thanks in advance!<br><br>Here is my UART configuration:<br>void UART2Init(int BAUDRATEREG2)<br>{<br> //Set up registers<br> U2BRG = BAUDRATEREG2; //set baud speed<br> U2MODE = 0x8000; //turn on module<br> U2STA = 0x0400; //set interrupts<br><br> //reset RX interrupt flag<br> IFS1bits.U2RXIF = 0;<br>}<br><br>//UART transmit function<br>void UART2PutChar(char
sentchar)<br>{<br> <br> while(U2STAbits.UTXBF == 1);<br> U2TXREG = sentchar;<br>}<br><br></div>
</div></body></html>