Do you have an example ?
Erich Styger gives me the answer:
“The thing is: check your configMAX_SYSCALL_INTERRUPT_PRIORITY setting. You cannot call any RTOS API functions like xSemaphoreGiveFromISR() from an interrupt which is higher (numerically lower) than configMAX_SYSCALL_INTERRUPT_PRIORITY.”
So I change the priority, and it is working
There are lots of ways of doing this - the best depends on your particular scenario. The most efficient method would be to use a direct to task notification. You will find an example of the scenario you highlight on this page. You could also use a binary semaphore (see the example on the xSemaphoreGiveFromISR() page), counting semaphore, queue, event group, (others?), but as those methods use an intermediary object rather than sending the event directly to the task they will be less efficient.
My problem is to synchronize an interrupt with a task (in this case when a buffer is full).
I understand that with FREERTOS is necessary to use xSemaphoreGiveFromISR or another instruction FromISR, but it is necessary to change the priority of the interrupt peripheral.
If you have an example for the FRDM K64 board with SDK and FREERTOS.
Thanks in advance
I have downloaded the SDK_2.0_FRDM-K64F.zip, I have checked the directory, there are Freertos example in SDK. For the event example, pls refer to the following example:
For the interrupt example, you can refer to the directory:
You can post an event in the callback function of the swtimer, the task with the xEventGroupWaitBits() will be running with OS intervening..
You can refer to the Richard Barry reply for the task efficiency.
Hope it can help you.
Information on how the interrupt priorities relates to FreeRTOS can be found on the following page: RTOS for ARM Cortex-M
Retrieving data ...