Hola amigos del foro, esto iniciandome con los micros de Atmel y estoy intentando inicializar 2 uart, ya el primero me funciona bien, pero el segundo al parecer no esta iniciando correctamente, este es mi codigo para inicializarlos:
const usart_serial_options_t uart_serial_options = {
.baudrate = CONF_UART_BAUDRATE,
#ifdef CONF_UART_CHAR_LENGTH
.charlength = CONF_UART_CHAR_LENGTH,
#endif
.paritytype = CONF_UART_PARITY,
#ifdef CONF_UART_STOP_BITS
.stopbits = CONF_UART_STOP_BITS,
#endif
};
/* Configure console UART 1. */
stdio_serial_init(CONF_UART_1, &uart_serial_options);
sysclk_enable_peripheral_clock(COM_PORT_USART_1);
usart_enable_tx(COM_PORT_USART_1);
usart_enable_rx(COM_PORT_USART_1);
usart_enable_interrupt(COM_PORT_USART_1, US_IER_RXRDY);
NVIC_EnableIRQ(USART1_IRQn);
/* Configure console UART 2. */
stdio_serial_init(CONF_UART_2, &uart_serial_options);//ESTA LINEA
sysclk_enable_peripheral_clock(COM_PORT_USART_2);
usart_enable_tx(COM_PORT_USART_2);
usart_enable_rx(COM_PORT_USART_2);
usart_enable_interrupt(COM_PORT_USART_2, US_IER_RXRDY);
NVIC_EnableIRQ(USART2_IRQn);
Si comento la primera linea de la configuración del uart 2 ("//ESTA LINEA") me funciona el uart 1 pero si la descomento el uart 1 no funciona.
Y el uart 2 hasta ahora no he podido leer nada.
Espero que me puedan ayudar, gracias.