# FreeRTOS and Kinetis KL46 (KDS)

**URL:** <https://forums.freertos.org/t/freertos-and-kinetis-kl46-kds/2902>\
**Category:** Kernel\
**Created:** [June 25, 2015, 3:42am UTC](https://forums.freertos.org/t/freertos-and-kinetis-kl46-kds/2902 "2015-06-25T03:42:14Z")\
**Posts on this page:** 4\
**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:** [June 25, 2015, 3:42am UTC](https://forums.freertos.org/t/freertos-and-kinetis-kl46-kds/2902/1 "2015-06-25T03:42:14Z")

</div>

**[williamjsell](https://sourceforge.net/u/williamjsell/)** wrote on [Thursday, June 25, 2015](https://sourceforge.net/p/freertos/discussion/382005/thread/84bd8143/#f4c7):

Well despite all my best efforts, I am now convinced that the port of FreeRTOS with ProcessorExpert is not correct. I could go into the gruesome details of what I am seeing, but I would rather just poll the community and ask if anyone has had better success with using FreeRTOS with KDS? I have tons of experience with FreeRTOS and I know the kernel is fine, it is widely deployed. I also _think_ I know what I am doing with implementing a FreeRTOS-base program. But when a task variable is getting corrupted by merely the action of passing it via a queue, and I have the task stack depth to 2K with hardly any deep calls, something ain’t right. The tasks I have do not do anything, but receive this message and pass it along. I am actually at a lost to the cause, but all ideas welcome…

---

<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:** [June 25, 2015, 6:32am UTC](https://forums.freertos.org/t/freertos-and-kinetis-kl46-kds/2902/2 "2015-06-25T06:32:22Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Thursday, June 25, 2015](https://sourceforge.net/p/freertos/discussion/382005/thread/84bd8143/#e1cf):

Erich, who knows most about the processor expert, is at the Freescale Technology Forum this week, so I’m going to have to start with some more basic questions:

Which version of FreeRTOS is it using (the comments at the top of each FreeRTOS source file will tell you that)?

Does the FreeRTOSConfig.h file you are using have configASSERT() defined?

The reason for asking these questions first is the number of configurations errors configASSERT() will catch depends on the FreeRTOS version.

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [June 25, 2015, 4:32pm UTC](https://forums.freertos.org/t/freertos-and-kinetis-kl46-kds/2902/3 "2015-06-25T16:32:47Z")

</div>

**[williamjsell](https://sourceforge.net/u/williamjsell/)** wrote on [Thursday, June 25, 2015](https://sourceforge.net/p/freertos/discussion/382005/thread/84bd8143/#1b58):

Sorry I have been very frustrated with this dev env. that I forgot my normal details:  
FreeRTOS Version : 8.0.1  
configAssert has been defined  
heap size set to 16384  
total number of task allowed : 8  
total defined 3 with configMINIMAL\_STACK\_SIZE at 128  
total queues defined 2 with depth of about 5 small elements  
memory allocation scheme is heap\_1.c  
running KDS 3.0.0 on Win7  
using tickless idle mode as we are sleeping the processor until it is woken up with an accelerometer generated interrupt.  
there are a few FreeRTOS timers in use and one mutex.

---

<div class="post-metadata">

**Author:** ![McuOnEclipse](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/mcuoneclipse/32/32_2.png) [@McuOnEclipse](https://forums.freertos.org/u/McuOnEclipse)\
**Post date:** [June 25, 2015, 9:36pm UTC](https://forums.freertos.org/t/freertos-and-kinetis-kl46-kds/2902/4 "2015-06-25T21:36:08Z")

</div>

**[xz8987f](https://sourceforge.net/u/xz8987f/)** wrote on [Thursday, June 25, 2015](https://sourceforge.net/p/freertos/discussion/382005/thread/84bd8143/#d9a8):

Hi William,  
I see that you have posted the same question to the Freescale Forum. I will follow-up there, as I believe you might not have set the interrupt priorities correctly or there might be an undetected stack overflow.

Erich
