Adding UART to FreeRTOS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adding UART to FreeRTOS

Jump to solution
1,559 Views
Daniel_Wax
NXP Employee
NXP Employee

With S32 Design Studio and MPC5748G I am starting with the FreeRTOS project and I am trying to add a UART console.  

I am having problems. 

Do I need to have the rxCALLBACK for the UART interrupt be inside a task?

Do I need to initialize the UART inside a task?

What are some "rules" of using FREERTOS I might be missing?  I seem to get a character output but the program gets lost in the weeds with an OSIF_SemaWait() routine

0 Kudos
1 Solution
1,432 Views
Daniel_Wax
NXP Employee
NXP Employee

Thanks Hung.. this is great!! I am attaching a fill project here

View solution in original post

0 Kudos
2 Replies
1,432 Views
hungnguyenphi
NXP Employee
NXP Employee

Hello Daniel Wax,

I would like to answer your question:

Do I need to have the rxCALLBACK for the UART interrupt be inside a task?

[Hung] From my understand, no we do not to have the rxCallBack

Do I need to initialize the UART inside a task?

[Hung]  From my understand, no.

What are some "rules" of using FREERTOS I might be missing?  I seem to get a character output but the program gets lost in the weeds with an OSIF_SemaWait() routine

[Hung] I guess that you have called the function LINFLEXD_UART_DRV_SendDataBlocking outside a task and then the program gets lost. From what I know, the LINFLEXD_UART_DRV_SendDataBlocking should be called in a task. I have modified the main of freertos example(examples\MPC5748G\demo_apps\freertos\Sources\main.c) to send a log in task, please find it in attached file.

0 Kudos
1,433 Views
Daniel_Wax
NXP Employee
NXP Employee

Thanks Hung.. this is great!! I am attaching a fill project here

0 Kudos