Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training



Posted by Jerry Durand on August 25, 2012
V7.2.0, LPC1754 using LPCXpresso

I'm building an application that currently has 4 tasks running
idle with hook, priority 0
two tasks with vTaskDelay in them, priority 1
Communications task with xSemaphoreTake in it, priority 4

In an interrupt at the end of a DMA I execute
xSemaphoreGiveFromISR(DMA_Done, &xHigherPriorityTaskWoken);
set bit on a port

the communications task clears the bit as soon as it gets the semaphore

What I'm seeing is the communications task doesn't run until about the next tick (I haven't checked precisely, but it looks to be right after a tick). I've traced through and xHigherPriorityTaskWoken is true, but when I step out of the interrupt I'm back in the Idle task.


Posted by Jerry Durand on August 25, 2012
I forgot, the Idle Hook has a _WFI() in it, if that matters.


Posted by Jerry Durand on August 25, 2012
More testing, it seems the semaphore is working fine, but for some reason the timer that triggers the DMA isn't firing at the right time. So, semaphore looks ok, something up with timer/DMA interaction. ???


Posted by Richard on August 25, 2012
“something up with timer/DMA interaction”

That would be LPC17xx specific, rather than FreeRTOS specific, so I couldn't comment directly. I would be surprised if there were any issues that were not mentioned in the chip's errata though.



Posted by Jerry Durand on August 25, 2012
Yes, not a FreeRTOS problem. I keep trying to break it but you did a very good job. :)

In this case I have one timer with three match registers enabled. I set the registers with the timer reset and they give it a GO. Two of the three matches hit dead on time, the third one is almost 1mS late out of 22.9mS (over 4% error!). SystemCoreClock tests dead on.

I may need a LOT more caffeine for this one.

[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists