Adding UART to FreeRTOS

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Adding UART to FreeRTOS

跳至解决方案
3,601 次查看
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 项奖励
回复
1 解答
3,474 次查看
Daniel_Wax
NXP Employee
NXP Employee

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

在原帖中查看解决方案

0 项奖励
回复
2 回复数
3,474 次查看
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 项奖励
回复
3,475 次查看
Daniel_Wax
NXP Employee
NXP Employee

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

0 项奖励
回复