Esp32 - getting to the core of the task

image

LOL, Damn !
No i was thinking along the lines of == vs = and thought maybe it's a possibility.

There is one explicit Arduino loop() function and a couple of task functions containing a loop.

Interesting...
that didn't occur to me, thanks

LOL, Mate we've had that conversation, Just say what you want to say .

Well, Geez mate, its' 400 pages, you know :stuck_out_tongue:
I'm going through it as we speak, i'm up to page 34
I've had 5 cups of coffee and it's 4am :slight_smile:
but rest assured i will go through it , if anyone will, it's me

I just figure because delays puts it into BLOCKED state, but of course with delay we specify a time event, i assumed that i could possibly given an argument with Delete as well.
I'll have a play with this.

Who said i wasn't accepting it ?

Ohh, ok, and here i was thinking you were trying to be rude :stuck_out_tongue:

Ok well to that i say this.........

2023-08-26 04_29_25-Define Firetruck - Google Search

At least that image is for single core controllers and I doubt that it is meant in detail for an ESP32.

Ok, well then if that's what you meant
the delay task in the main arduino loop (to my knowledge) does not have a priority level although i imagine it would be given one at some stage, if i had to guess, i would say it was 0

No, it specifically speaks of ESP32 and Multi Threading and RTOS
https://www.digikey.com.au/en/maker/projects/introduction-to-rtos-solution-to-part-3-task-scheduling/8fbb9e0b0eed4279a2dd698f02ce125f

Reduce it to about 3 pages for each API function that you really use.

Sure, but it's still a useful read

Take a look at the definition for the pdMS_TO_TICKS() macro that converts ms to Tick counts.

ok, and if you're interested here is another link, this one is from FreeRTOS
https://www.freertos.org/implementation/a00004.html

Run the sketch/Fig-1 of post #1 with the same priority levels for both Task10 and Task11. Observe the blinking of three LEDs and predict the priority level of the LoopTask. I have an answer and let me check if it matches with your one and then I will ask the Teachers to devise an experiment for knowing the priority level of the loop() function.

2023-08-26 04_45_01-RTOS Task Scheduling and Prioritization

Again I could not find that it is from the official FreeRTOS or ESP provider. The reference to ESP32 comes after the general introduction and all following code examples perform the ms to tick conversion.

Even if it may be possible (but not useful) to set a tick to 1 ms I think that it's a stupid idea to oversimplify ticks into ms. If you don't proof your assumption yourself then I'll test and report how many ticks make up 1 ms on my ESP.

The ChatGPT says:
A tick is a fundamental time unit in FreeRTOS, and its duration is determined by the system's tick rate, which is typically set during FreeRTOS initialization. For example, if the tick rate is set to 1 millisecond (1 tick = 1 ms), then vTaskDelay(1); would delay the task for 1 millisecond.

So you're saying that if i use ms there could be an overflow problem, Hmm, Interesting, ok

I would be really surprised if this is needed. loop() runs as a task with a priority of 1