Hi
I have a couple of questions about esp32 and the RTOS that appears in it
1)Is it true that when using interrupts (e.g. from a timer), the best practice is to make them only wake up the task that "does" all the work?
Because the fact that ISRs are supposed to be the shortest is obvious, but are we even better programmers by flipping even a short instruction in a task?
2)What is the best (lightest) way to wake up a task from an interrupt assuming we don't need to pass data? Here it is written that using a queue. I used it in my project and it does indeed work. I also tried vTaskSuspend(); and waking xTaskResumeFromISR(); but esp32 was doing a panic. Here it says it's normal because the function wasn't tested and runs some kind of watchdog. I know it can be turned off but that's probably not the point here.
3)Does the fact that the system Tick is at 1ms mean that the task cannot execute more often than every 1ms?
Why I ask - I have in the project an interrupt from gpio exactly every second which wakes up the task using queue(in the task an infinite loop which is blocked by xQueueReceive). And it works, I have no objections.
I also have a timer interrupt triggered every 35µs. Its instructions are in the ISR everything works.
When I move these instructions to the task in the ISR I just wake it up, the function slows down terribly I would say it executes every 1ms. The method of waking up is identical to the one in the task, which is every second. Again, it is possible to change the Tick system but I don't want to do that
4)After switching from avr am I wandering around and unnecessarily using interrupts for the timer. Maybe there is another simpler way to wake up tasks with timer
I have a couple of questions about esp32 and the RTOS that appears in it
1)Is it true that when using interrupts (e.g. from a timer), the best practice is to make them only wake up the task that "does" all the work?
Because the fact that ISRs are supposed to be the shortest is obvious, but are we even better programmers by flipping even a short instruction in a task?
2)What is the best (lightest) way to wake up a task from an interrupt assuming we don't need to pass data? Here it is written that using a queue. I used it in my project and it does indeed work. I also tried vTaskSuspend(); and waking xTaskResumeFromISR(); but esp32 was doing a panic. Here it says it's normal because the function wasn't tested and runs some kind of watchdog. I know it can be turned off but that's probably not the point here.
3)Does the fact that the system Tick is at 1ms mean that the task cannot execute more often than every 1ms?
Why I ask - I have in the project an interrupt from gpio exactly every second which wakes up the task using queue(in the task an infinite loop which is blocked by xQueueReceive). And it works, I have no objections.
I also have a timer interrupt triggered every 35µs. Its instructions are in the ISR everything works.
When I move these instructions to the task in the ISR I just wake it up, the function slows down terribly I would say it executes every 1ms. The method of waking up is identical to the one in the task, which is every second. Again, it is possible to change the Tick system but I don't want to do that
4)After switching from avr am I wandering around and unnecessarily using interrupts for the timer. Maybe there is another simpler way to wake up tasks with timer