SAM4 USART interrupt code example

Is there a sample code for using USARTx with interrupts in FreeRTOS ? Thank you

SAM4 USART interrupt code example

Yes – there are numerous examples in the Atmel ASF (Atmel Software Framework).  Look of “FreeRTOS Peripheral Control” examples in the ASF download (http://asf.atmel.com).  See http://www.atmel.com/images/doc42049.pdf Regards.

SAM4 USART interrupt code example

I am sorry, but I have looked at that for a week now and nothing I do works. My code is stuck repeating the same USART1_handler() over and over again. I tried to follow the SYS_TICK interrupt as a model, but that did not work. I would guess that I am not actually clearing the USART1 interrupt, but I just do not see why I can not do it. As soon as I enable that interrupt, it starts and does not end. If pasting the code here would help, I will. ( I know its frowned upon) Thank you (again)

SAM4 USART interrupt code example

I don’t think the example uses USART1_handler() because it uses the DMA interrupts instead. I could be wrong though.