I am running freertos on a dspic33f and am having trouble to get context switching to function properly.
I have verified that the interrupt is happening and that the vTaskIncrementTick() function is being called.
I have created 2 different task as follows:
xTaskCreate( vIrrigationTask, ( signed char * ) “Irrigation”, 100, NULL, tskIDLE_PRIORITY + 3, NULL );
xTaskCreate( vModuleEmulatorTask, ( signed char * ) “Module”, 100, NULL, tskIDLE_PRIORITY + 2, NULL );
My problem is that which ever task has the highest priority always runs (wont give any time to the other task), or if I set both priorities to be the same (2 for example) then the vModuleEmulatorTask task will only run. I am unsure why this is occurring or what I can do to fix this problem.
If you need more information please ask, as I am completely lost and don’t even know what might be useful information to post.