UART Receiving Interrupt while using FreeRTOS/CMSIS V2
When I try to set up a HAL_UART_Receive_IT my program won't compile.
I am new to the FreeRTOS concept, but it is necessary for me to learn how to set it up for a project I am working on. For that, I started restructuring a previous project to learn from the process. I stumbled with the problem of me not knowing how to setup a UART interrupt when using tasks. I tried reading online on how to do it. This is what I have done so far:
- In my .ioc file I enable FreeRTOS using CMSIS V2
- Using the .ioc configurations I enabled
- four tasks with the same priority
- two queues
- one Semaphore
- one Mutex
- I enable UARTS 1,2 and 3
- I enabled global interrupts for all the UARTS
I tested tasks by making a LED blink. But when I tried to set up a HAL_UART_Receive_IT my program wouldn't compile. My guess is that I have a bad case of I-am-a-rookie. But I tried this:
- I tried calling the function from the main() setup before the osKernelStart() instruction, but it failed.
- I tried calling it inside one of the tasks but it failed. I used both a buffer defined globally and a buffer defined locally in the task(I knew that one would fail).
Normally the IDE does a great job at guiding me whenever there is a bug or outlines where I made a syntax mistake. Right now, it does nothing. It fails to compile. It works again when I erase the HAL_UART_Receive_IT(), though. Where should I call this function? What do I need to set up UART reception using FreeRTOS(CMSIS V2)? I know I have to pass the received message through a queue, but I have not being able to compile the code, yet.
P.S. I get a message saying I did not enabled the USE_NEWLIB_REENTRANT, is that important? I read the description but it doesn't sound like something I need at the moment.
