YEAAAAHHHH! It's works!
For anyone with my problem:
Open the file xio_usart.h. Go down at this section: //**** USB device configuration ****
In this section code you must change these lines:
#define USB_USART USARTC0 // USB usart
#define USB_RX_ISR_vect USARTC0_RXC_vect // (RX) reception complete IRQ
#define USB_TX_ISR_vect USARTC0_DRE_vect // (TX) data register empty IRQ
with these lines:
#define USB_USART USARTC1 // USB usart
#define USB_RX_ISR_vect USARTC1_RXC_vect // (RX) reception complete IRQ
#define USB_TX_ISR_vect USARTC1_DRE_vect // (TX) data register empty IRQ
(only change the C0 with C1 serial port)
These lines:
#define USB_CTS_bp (1) // CTS - bit position (pin is wired on board)
#define USB_CTS_PINCTRL PIN1CTRL // CTS - PINxCTRL assignment
with these lines:
#define USB_CTS_bp (5) // CTS - bit position (pin is wired on board)
#define USB_CTS_PINCTRL PIN5CTRL // CTS - PINxCTRL assignment
(move the old pin1 to new pin5 for CTS signal)
This line:
#define USB_RTS_bp (0) // RTS - bit position (pin is wired on board)
with line:
#define USB_RTS_bp (4) // RTS - bit position (pin is wired on board)
(move the old pin 0 to new pin 4 for RTS signal)
These lines:
#define USB_RX_bm (1<<2) // RX pin bit mask
#define USB_TX_bm (1<<3) // TX pin bit mask
with these lines:
#define USB_RX_bm (1<<6) // RX pin bit mask
#define USB_TX_bm (1<<7) // TX pin bit mask
(move the old 2,3 RX-TX pins to new pins 6 and 7)
In this section: //**** RS485 device configuration (no echo or CRLF) ****
you must change the RS485-Serial pins and the Interrupts vector.
replaced these lines:
#define RS485_USART USARTC1 // RS485 usart
#define RS485_RX_ISR_vect USARTC1_RXC_vect // (RX) reception complete IRQ
#define RS485_TX_ISR_vect USARTC1_DRE_vect // (TX) data register empty IRQ
#define RS485_TXC_ISR_vect USARTC1_TXC_vect // (TX) transmission complete IRQ
#define RS485_PORT PORTC // port where USART is located
#define RS485_RE_bm (1<<4) // RE (Receive Enable) pin - active lo
#define RS485_DE_bm (1<<5) // DE (Data Enable)(TX) - active hi
#define RS485_RX_bm (1<<6) // RX pin
#define RS485_TX_bm (1<<7) // TX pin
with these lines:
#define RS485_USART USARTC0 // RS485 usart
#define RS485_RX_ISR_vect USARTC0_RXC_vect // (RX) reception complete IRQ
#define RS485_TX_ISR_vect USARTC0_DRE_vect // (TX) data register empty IRQ
#define RS485_TXC_ISR_vect USARTC0_TXC_vect // (TX) transmission complete IRQ
#define RS485_PORT PORTC // port where USART is located
#define RS485_RE_bm (1<<0) // RE (Receive Enable) pin - active lo
#define RS485_DE_bm (1<<1) // DE (Data Enable)(TX) - active hi
#define RS485_RX_bm (1<<2) // RX pin
#define RS485_TX_bm (1<<3) // TX pin
------------------------
Basically we reversed the USB-serial with RS485-serial (not used)
Good work...
Guido