FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [August 2012 Threads] portEND_SWITCHING_ISR delayPosted 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 portEND_SWITCHING_ISR(xHigherPriorityTaskWoken);
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.
RE: portEND_SWITCHING_ISR delayPosted by Jerry Durand on August 25, 2012 I forgot, the Idle Hook has a _WFI() in it, if that matters.
RE: portEND_SWITCHING_ISR delayPosted 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. ???
RE: portEND_SWITCHING_ISR delayPosted 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. Regards.
RE: portEND_SWITCHING_ISR delayPosted 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|