Uart Driver Free Rtos Xqueuereceive

Jul 27, 2018  Here is my implementation of FreeRTOS driver for FLEXIO UART drvier. This is tested on MKL17Zxxx controller. It requires a patch to the fslflexiouart.c to fix a bug in that driver (as shown on the previous post). Prolight 1000 specs. If you use this code in your project please let me know if you find any bugs. Here is a sample way to use the driver. FreeRTOS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (version 2) as published by the Free Software Foundation AND MODIFIED BY the FreeRTOS exception.

Joined: Fri. Mar 16, 2012
Total votes: 0
Freertos examples

This is the first time I write program for a SAMD20. As I want to use the FreeRTOS port, I take the ASF libirary 'FreeRTOS_OLED1_XPRO' for reference.

The first thing I need to do is to write a RS485 recevie and transmit code. I have a SAMD20 Xplained Pro development board in hand, so I made a uart-to-RS485 adaptor board. Having a whole-day test I was able to transmit and receive. However there are some problem on the receiver.

I enabled interrupt for the receiver. In the receive interrupt handler, I just put the received byte into a queue. Then in the normal task the software blocked and try to receive from that queue. I found that I cannot receive more than one byte from the queue to a buffer, even I checked that there are actually at least two bytes in the queue.

Could you help me?

I have used a similar technique on a FreeRTOS UC3A0 port. However in that port, there is a special section of code which wrapped the whold interrupt handler: 'portENTER_SWITCHING_ISR' and 'portEXIT_SWITCHING_ISR'. Does we need this kind of code for the SAMD20?

Joined: Fri. Mar 16, 2012
Total votes: 0

This is the first time I write program for a SAMD20. As I want to use the FreeRTOS port, I take the ASF libirary 'FreeRTOS_OLED1_XPRO' for reference.

The first thing I need to do is to write a RS485 recevie and transmit code. I have a SAMD20 Xplained Pro development board in hand, so I made a uart-to-RS485 adaptor board. Having a whole-day test I was able to transmit and receive. However there are some problem on the receiver.

Im having trouble decoding the serial number on my dobro. Im wondering the year. Its a d style, wood body. Some codes ive seen say the last 2 are year digits, but the guy i bought it from said he bought it new in the 80s. This serial number doesnt conform to the 80s code either. Dobro serial number dating.

I enabled interrupt for the receiver. In the receive interrupt handler, I just put the received byte into a queue. Then in the normal task the software blocked and try to receive from that queue. I found that I cannot receive more than one byte from the queue to a buffer, even I checked that there are actually at least two bytes in the queue.

Could you help me?

I have used a similar technique on a FreeRTOS UC3A0 port. However in that port, there is a special section of code which wrapped the whold interrupt handler: 'portENTER_SWITCHING_ISR' and 'portEXIT_SWITCHING_ISR'. Does we need this kind of code for the SAMD20?