cancel
Showing results for 
Search instead for 
Did you mean: 

USB CDC + FreeRtos Queue Problem

Manikandan K
Associate III
Posted on June 21, 2017 at 07:06

Hi,

I'm using Nucleo F207ZG , I'm trying to send the message using xQueueSend from CDC_Receive function but the following i cant because of priority level ,

Program received signal SIGINT, Interrupt.

0x080030dc in vPortValidateInterruptPriority () at ../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c:709

configASSERT( ucCurrentPriority >= ucMaxSysCallPriority );

Any suggestion ?

-Thanks & Regards

K.Manikandan

1 REPLY 1
Barry.Richard
Associate III
Posted on June 21, 2017 at 21:54

If you look in the source code at that point there is a long comment that, I think, gives you the answer you are looking for.  Reproduced here (cut out of the source code at the point you are highlighting yourself).  Not the references to further information on the FreeRTOS.org website:

/* The following assertion will fail if a service routine (ISR) for

an interrupt that has been assigned a priority above

configMAX_SYSCALL_INTERRUPT_PRIORITY calls an ISR safe FreeRTOS API

function. ISR safe FreeRTOS API functions must *only* be called

from interrupts that have been assigned a priority at or below

configMAX_SYSCALL_INTERRUPT_PRIORITY.

Numerically low interrupt priority numbers represent logically high

interrupt priorities, therefore the priority of the interrupt must

be set to a value equal to or numerically *higher* than

configMAX_SYSCALL_INTERRUPT_PRIORITY.

Interrupts that use the FreeRTOS API must not be left at their

default priority of zero as that is the highest possible priority,

which is guaranteed to be above configMAX_SYSCALL_INTERRUPT_PRIORITY,

and therefore also guaranteed to be invalid.

FreeRTOS maintains separate thread and ISR API functions to ensure

interrupt entry is as fast and simple as possible.

The following links provide detailed information:

http://www.freertos.org/RTOS-Cortex-M3-M4.html

http://www.freertos.org/FAQHelp.html

*/