[etherlab-users] EL9800 board ECAT and UART conflict?

peak peak peakpeak05 at yahoo.com
Wed Jun 8 17:01:20 CEST 2011


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;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20110608/3ade36e0/attachment-0002.htm>


More information about the Etherlab-users mailing list