This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problems using the UART of the SAMD21

I have a problem running the UART, the microcontroller I am using is the SAMD21G18A and this is the code:

this is uart.h:

this is uart.c:

and this is the pin configuration

this is gpio.c

The exercise that I try to do is the famous ECO, that is to say that I try that what I write in the Tx sends it again by the Rx bus, I modified it and I have tried it by the debug and it stays in the line of the uart.c

while(UART5.SYNCBUSY.reg&SERCOM_USART_SYNCBUSY_ENABLE); //Espera a que se habilite el UART

i don't know if the uart configuration is wrong or missing, i got this code from a book:

"Atmel ARM Programming for Embedded Systems"

authors:

Muhammad Ali Mazidi,
Shujen Chen,
Eshragh Ghaemi.

i want to know if this book is wrong and so recommended is that book or I have it wrong, thank you very much and i hope your answer soon. Before I forget, the operating frequency of the microcontroller is 8 MHz

0