cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

RoFr_4201436
New Contributor II

Hello there,

I created a project on Psoc 4, using the uC/OS. I created 3 tasks, two tasks for turn on and turn off leds and one taks is a botton. The task called "Sinal_Pedestre_1_Task" is not working and I do not know why. Someone can help?

Follow the project on the attachment.

For open the project, unzip the file and open the Psoc Creator first, and then click in "File->Open->Project/Workspace" and open the project "Pratica 3_Psoc 4\Micrium\Examples\Cypress\uCOS_PSoC4_BLE\OS2\PSoC\uCOS II.cywrk".

0 Likes
1 Solution
Rakshith
Moderator
Moderator

Hi @RoFr_4201436

Sure. I have attached the project with this comment. Please check and let me know if it works. 

The priority changes I made are - 

Rakshith_0-1614002776308.png

Thanks and Regards,
Rakshith M B

View solution in original post

0 Likes
6 Replies
Rakshith
Moderator
Moderator

Hi @RoFr_4201436

I built the project. I then changed the device as I did not have your device to test the project. I went into debug mode, added a breakpoint at the ISR and I could observe that the Button ISR was getting executed as expected.

I then checked the tasks and I found that not all tasks were created successfully. Can you please add a check to see if the tasks are getting created? I could see that OS_ERR_PRIO_EXIST was returned as an error. You can refer here for more information regarding the error - https://micrium.atlassian.net/wiki/spaces/osiidoc/pages/163900/Task+Management#TaskManagement-Creati...

I then changed the priority and found that all the tasks were created as expected. Can you please do the same and let me know if it works? 

Thanks and Regards,
Rakshith M B
0 Likes
RoFr_4201436
New Contributor II

Can you share the project that you change with me? 

0 Likes
Rakshith
Moderator
Moderator

Hi @RoFr_4201436

Sure. I have attached the project with this comment. Please check and let me know if it works. 

The priority changes I made are - 

Rakshith_0-1614002776308.png

Thanks and Regards,
Rakshith M B

View solution in original post

0 Likes
RoFr_4201436
New Contributor II

Man, It worked perfectly, but I had another problem. When I put both tasks to work simultaneously, just run the task "Sinal_Auto_1_Task", I would like to make all tasks work simultaneously, would I have to enable anything? 

0 Likes
Rakshith
Moderator
Moderator

Maybe this should help - 

Rakshith_0-1614087450280.png

I found it in this document - http://www.soe.uoguelph.ca/webfiles/engg4420/uCOS-II%20The%20Real-Time%20Kernel.pdf

Thanks and Regards,
Rakshith M B
0 Likes
RoFr_4201436
New Contributor II

Thanks

0 Likes