Hello,
I am using EL9800 evaboard. However, there's an error with my UART
communication.
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.
Can anyone explain me?
Thanks in advance!
Here is my UART configuration:
void UART2Init(int BAUDRATEREG2)
{
//Set up registers
U2BRG = BAUDRATEREG2; //set baud speed
U2MODE = 0x8000; //turn on module
U2STA = 0x0400; //set interrupts
//reset RX interrupt flag
IFS1bits.U2RXIF = 0;
}
//UART transmit function
void UART2PutChar(char sentchar)
{
while(U2STAbits.UTXBF == 1);
U2TXREG = sentchar;
}
_______________________________________________
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users