Free RTOS - PSOC5LP

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
CaDu_3933941
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

Hi all,

I am working on an RC car project and for this project I am using a multitude of sensors (speed, GPS, Proximity). So far, I've been running through a single while(1) loop, however, I've been thinking about exploring the possibility of using FreeRTOS to manage all the sensors in the system. (I have no experience using RTOS but I would like to start somewhere)

Now, this uses radio communication over UART in order to receive the commands for the car's movement.

My question is: Would you recommend using an RTOS for something like this?

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi

FreeRTOS is advantageous in those aplications where:

1. There are lot of tasks running in the code.

2. There are lot of waiting states or delays implemented in the code.

3. When you want to add any new task(s) in the future.

So for your application if you feel any of the above mentioned points is required, you can go with FreeRTOS.

But, if your application has only few tasks and if they can be implemented using interrupts (for example you can implement UART in interrupt mode), both FreeRTOS and Bare-metal programming would give satisfactory results. Please refer the attached code snippet which uses PendSV exception to execute bottom-half tasks of any interrupts.

To answer your question, Since you are beginner in FreeRTOS, we recommend you to go with FreeRTOS, implement and compare the results with the current implementation.

Hope this information helps! Kindly let us know if we can help you more.

Thanks

Ganesh

View solution in original post

0 Likes
1 Reply
lock attach
Attachments are accessible only for community members.
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi

FreeRTOS is advantageous in those aplications where:

1. There are lot of tasks running in the code.

2. There are lot of waiting states or delays implemented in the code.

3. When you want to add any new task(s) in the future.

So for your application if you feel any of the above mentioned points is required, you can go with FreeRTOS.

But, if your application has only few tasks and if they can be implemented using interrupts (for example you can implement UART in interrupt mode), both FreeRTOS and Bare-metal programming would give satisfactory results. Please refer the attached code snippet which uses PendSV exception to execute bottom-half tasks of any interrupts.

To answer your question, Since you are beginner in FreeRTOS, we recommend you to go with FreeRTOS, implement and compare the results with the current implementation.

Hope this information helps! Kindly let us know if we can help you more.

Thanks

Ganesh

0 Likes