Esp32 - getting to the core of the task

No it's ok, not that big of a deal, However, Just to be clear, are you then saying
that i need to include "ticks" in delay or... what ?

I was taught the way to use delay is
You have the instruction "delay" and you have the parenthesis and inside of them you place your argument which is time "in ms" , that's how i was taught.
Now you are saying we need to put ticks in there, is that it.
But if 1 tick - 1ms , Let's even say there is a conversation happening, we would still be putting in the same value wouldn't we ?

Not at all. I'm saying if you look at that macro, you'll see how a number of ms is converted to an equivalent number of Ticks. That is the question under discussion, isn't it? Spoiler Alert: it's 1:1.

But now you've got me curious as well,
Look it's 5am now, I gotta get some rest,
i will research this tick vs ms thing, don't worry and i'll test it.

And AFAIK the idle task runs at priority 0. If the idle task can not do its housekeeping then the watchdog will bark and reset the controller.

Do we trust ChatGPT ???
You seem to, I haven't had much exposure to it , my understanding is that we can use to write the basics of code but not for anything meaningful.

Personal, i don't really want to take advice from an A.I. that i have not verified that gives accurate information.

Now as to what was actually said..

Yes, i know this, it's the basic and smallest unit that the scheduler uses.

Hold on.. so are we saying that A TICK, IS NOT... A FIXED RATE but instead variable ?
That's interesting , or is the A.I. Wrong ?

I thought the reason for a RTOS is to make your project "event" based and that task priorities are
assigned to tasks based on how quickly you want a task to react to an event.

That's my understanding.

OK, I've read it and i put it in as a precaution since i didn't want to have a stupid problem like it crashing and the reason being after 30mins of debugging that i didn't put in a simple delay.
thats' why i put it in,
Now that i know my code works, we can feel free to take it out and play around with it

And it documents what? Scheduling in unspecified time slices.

Mine 3-LED sketch/Fig-1 of post #10 is now at running condition on my ESP32 and I clearly observe that they are being served on round robin time sharing basis which is only effective if the participating tasks have equal priority levels. In the referred sketch Task10 and Task11 have been initialized at priority level 1.

It will if you hang Core 0, not necessarily with Core 1.

Well.. Sort of ..
Yes i do want to make it event based.
as for Priorities, My understanding of setting priorities was to organize what task goes first and second and so on as opposed to how quick they react to an event, although that would also be useful

Nope. I keep telling you that's what inter-task synchronization is all about.

There's a lot of blind leading the blind going on in this thread.

Why would you need an RTOS if you just wanted to run functions in some order. All you would
have to do is call function1 first then call function 2 next then ...

No, I'm just listening to what you're saying, i'm not debating it.

I mean......... who knew huh ? :stuck_out_tongue:

OK, but we're gonna learn that aren't we,
and besides, that's why your'e here isn't it , to keep all us "Blind folk" on the straight an narrow so that a car doesn't hit us while crossing the road :slight_smile:

Ok so how do you suggest i proceed to gain a better understanding of Inter-task synchronization

TO LEARN ...

OK Guys, I'm off to bed,
I've answered all the comments, need a bit of a break , speak to you guys tomorrow,

I'll try to think up some more interesting stuff as well as try to get into inter-task sync, i'll see what i can do .

"Mastering the FreeRTOS Real Time Kernel" document is replete with examples. I'd suggest taking some of those, fleshing them out, and customizing them to the particular flavor of FreeRTOS in the ESP32. For assistance, post your attempts and any problem encountered.

Going through it as we speak

OK Will do
I've only gone into a humble 34 pages of 400, Barely cracked the binding on it.
let me at least get to 50 pages and see what happens.

Be cool mate
Good Night for now