Hi,
I have been reading quite a bit on freeRTOS but being at the beginning things got more confusing before they get clearer…
I am using freeRTOS with MPLAB Hamrony3 on a PIC32. I mention using Harmony3 because Harmony creates a different file for each task created (they call it app_task_1.c app_task_2.c etc).
Now… I have various devices on a serial bus and as mentioned in a previous post it has some inputs and some outputs which I want to be handled by separate tasks. The IC also needs initialisation and I do that by keeping a copy of all its registers (only 8) into the program and at boot those variables are read from memory and written into the IC to configure it.
Questions:
1) Where do I place the set of variables that mirror the I2C chip registers? Because I have at least 2 task files (inputs_read.c and outputs_write.c) it would be confusing to place them in either of them…
2) Do I create a separate task and in that task’s file place a) the variables themselves [and call them with ‘extern’ from the other files], b) initialise them and c) also place the code that writes via the I2C to configure the I2C chip registers?
3) And do I then put that task on suspend for the rest of the time never to be run again?
Where can I find good resources on embedded firmware architecture using RTOS/freeRTOS?
(apart from the PDF of the freeRTOS itself)
Thank you