# EFM32GG Starter Kit STK3700  FreeRTOS

**URL:** <https://forums.freertos.org/t/efm32gg-starter-kit-stk3700-freertos/7645>\
**Category:** Kernel\
**Created:** [January 30, 2019, 7:56pm UTC](https://forums.freertos.org/t/efm32gg-starter-kit-stk3700-freertos/7645 "2019-01-30T19:56:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [January 30, 2019, 7:56pm UTC](https://forums.freertos.org/t/efm32gg-starter-kit-stk3700-freertos/7645/1 "2019-01-30T19:56:42Z")

</div>

**[ignaciovarex](https://sourceforge.net/u/ignaciovarex/)** wrote on [Wednesday, January 30, 2019](https://sourceforge.net/p/freertos/discussion/382005/thread/4d9d756c7a/#d95f):

Hello Everyone,

I am EFM32GG Starter Kit STK3700 and utilizing a simple example that starts a thread and waits for xQueueReceive that gets xQueueSendToBackFromISR from an uart receive ISR. My issue is that my uart receive ISR only gets triggered once and queue doesn’t seem work either when the ISR gets triggered. I have attached source code and a FreeRTOSCongfig file that I am working with. I can’t seem to pin point what’s going on. Any adicise would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [January 30, 2019, 8:19pm UTC](https://forums.freertos.org/t/efm32gg-starter-kit-stk3700-freertos/7645/2 "2019-01-30T20:19:09Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Wednesday, January 30, 2019](https://sourceforge.net/p/freertos/discussion/382005/thread/4d9d756c7a/#d95f/439d):

You code doesn’t show how the queue is created or how data is being  
received from it.

First, start without FreeRTOS, just use a very basic main() program with  
some interrupts to check that you can control the UART correctly -  
peripheral specific drivers are outside the scope of FreeRTOS.

Only once you have the driver working, add in the FreeRTOS parts.

Next, a Queue is not a good way of doing what you want. Have a look at  
using a stream buffer instead - it is designed for this kind of use  
case. Some older examples that predate stream buffers, and deliberately  
load the scheduler up for test purposes, do use queues, but it is not  
suggested for production code.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [January 30, 2019, 8:36pm UTC](https://forums.freertos.org/t/efm32gg-starter-kit-stk3700-freertos/7645/3 "2019-01-30T20:36:01Z")

</div>

**[ignaciovarex](https://sourceforge.net/u/ignaciovarex/)** wrote on [Wednesday, January 30, 2019](https://sourceforge.net/p/freertos/discussion/382005/thread/4d9d756c7a/#ff6d):

Richard,

Thank you for your response. I have created another project without the FreeRTOS transmit and receive work as I expected. There is a xQueueCreate in the main after the SLEEP\_Init function call.

xQueueGPS = xQueueCreate (3,64)  
I have also attempted to create it like this too  
xQueueGPS = xQueueCreate (3,sizeof(char))

I will take a look at stream buffer, however I would really like to understand where my break is. Anything that could help with this would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [January 30, 2019, 11:33pm UTC](https://forums.freertos.org/t/efm32gg-starter-kit-stk3700-freertos/7645/4 "2019-01-30T23:33:39Z")

</div>

**[ignaciovarex](https://sourceforge.net/u/ignaciovarex/)** wrote on [Wednesday, January 30, 2019](https://sourceforge.net/p/freertos/discussion/382005/thread/4d9d756c7a/#29d6):

Hello Richard,

I have an update. When comment out the following from my ISR

xHigherPriorityTaskWoken\_UART1\_IRQ = pdFALSE;

```
          xQueueSendToBackFromISR(xQueueGPSrx, &rxData,
                  &xHigherPriorityTaskWoken_UART1_IRQ);

portYIELD_FROM_ISR(xHigherPriorityTaskWoken_UART1_IRQ);

```

My uart receive ISR functions as I expect. If at all that is a clue.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [January 31, 2019, 6:49pm UTC](https://forums.freertos.org/t/efm32gg-starter-kit-stk3700-freertos/7645/5 "2019-01-31T18:49:43Z")

</div>

**[ignaciovarex](https://sourceforge.net/u/ignaciovarex/)** wrote on [Thursday, January 31, 2019](https://sourceforge.net/p/freertos/discussion/382005/thread/4d9d756c7a/#b135):

I have managed to get things working. But I don’t understand why. I have to set “configMAX\_SYSCALL\_INTERRUPT\_PRIORITY 30” for thread that is waiting on the receive queue call for things to work. The thread priority that’s waiting on the queue is set to “tskIDLE\_PRIORITY + 1”. tskIDLE\_PRIORITY is set to zero. Any insight would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [January 31, 2019, 6:49pm UTC](https://forums.freertos.org/t/efm32gg-starter-kit-stk3700-freertos/7645/6 "2019-01-31T18:49:48Z")

</div>

**[ignaciovarex](https://sourceforge.net/u/ignaciovarex/)** wrote on [Thursday, January 31, 2019](https://sourceforge.net/p/freertos/discussion/382005/thread/4d9d756c7a/#88b3):

I have managed to get things working. But I don’t understand why. I have to set “configMAX\_SYSCALL\_INTERRUPT\_PRIORITY 30” for thread that is waiting on the receive queue call for things to work. The thread priority that’s waiting on the queue is set to “tskIDLE\_PRIORITY + 1”. tskIDLE\_PRIORITY is set to zero. Any insight would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [February 1, 2019, 9:21am UTC](https://forums.freertos.org/t/efm32gg-starter-kit-stk3700-freertos/7645/7 "2019-02-01T09:21:07Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Friday, February 01, 2019](https://sourceforge.net/p/freertos/discussion/382005/thread/4d9d756c7a/#88b3/abd4):

From what you post it sounds like you have, or at least had, a  
misconfiguration. I recommend ensuring you are using the very latest  
version of FreeRTOS, and have configASSERT() defined, as the newer the  
version of FreeRTOS the more assert calls there are to check the  
software configuration matches the hardware you are running. Also check  
out this page, if you have not done so already (suspect you have read  
already, but I include the link just in case):  
[https://www.freertos.org/RTOS-Cortex-M3-M4.html](https://www.freertos.org/RTOS-Cortex-M3-M4.html)
