cancel
Showing results for 
Search instead for 
Did you mean: 

Should I use xTaskCreate if I want to use UART?

LTech
Associate III

I want to send data using UART, I've configured everything but I don't get any data output unfortunately.

My question is whether this can be because of the fact that I am doing nothing with xTaskCreate? When should xTaskCreate be used and should I use it in my case?

16 REPLIES 16

I think I have to write it into the Model::tick function, right?

If you just want something basic working, then yes you can use Model::tick(), but anything you do here is a part of your RENDER TIME for each frame. This is where a different task and an message queue comes into play-

I think I almost got it, I have problems with NVIC priority and NVIC Enable, if I use it, I get rubbish out of the UART and screen doesn't show up, if I don't use it, the screen shows up but nothing comes out of the UART.

Almost got it ! The task gets stuck after the following line:

HAL_NVIC_EnableIRQ(UART5_IRQn);

Why is that?

Update: I get '255' out when I transmit the message in DMA mode when using xTaskCreate. Without using xTaskCreate so when calling a function transmits the message fine (although screen doesn't show up).

I got it working ! :) Thanx for all the help !

That's great to hear! :)