Search found 36 matches

by HelWeb
Wed Apr 10, 2019 2:01 am
Forum: General Discussion
Topic: Variable doesn't update between cores
Replies: 30
Views: 40067

Re: Variable doesn't update between cores

I transfered the code to IDF. There it works, after i stopped the WatchDog for core 1 <<< Arduino delay () is not the same as vTaskDelay() - which you should use. delay() does not a taskswitching, vTaskDelay does. A Semaphore is not necessary . The access may give a confilict, but until the next tes...
by HelWeb
Wed Apr 10, 2019 12:44 am
Forum: General Discussion
Topic: RTOS running on one core only
Replies: 37
Views: 51805

Re: RTOS running on one core only

A picture tells more than 1000 words ;)
by HelWeb
Wed Apr 10, 2019 12:14 am
Forum: General Discussion
Topic: RTOS running on one core only
Replies: 37
Views: 51805

Re: RTOS running on one core only

[Codebox] //REG_WRITE(GPIO_OUT_W1TC_REG,(1<<PinY)); // 50 ns // gpio_set_level(PinY, 0 ); // 147.5 ns //if( xSemaphoreTake( xSemaphore, 0 ) == pdTRUE ) { // 710 ns (rare), 1080 ns (rare) - 3000 ns (sometimes) - 3380 ns (mostly) - 6600 ns (rare) //xSemaphoreGive( xSemaphore ); //} //gpio_set_directio...
by HelWeb
Wed Apr 10, 2019 12:12 am
Forum: General Discussion
Topic: RTOS running on one core only
Replies: 37
Views: 51805

Re: RTOS running on one core only

Let me answer with Kenny Kerr Author • Systems programmer • Creator of C++/WinRT • Engineer on the Windows team at Microsoft • Romans 1:16 "If you work for a company that has one of those coding standards documents that would annihilate an entire rainforest were it ever to be printed, you’d better s...
by HelWeb
Mon Apr 08, 2019 2:08 pm
Forum: General Discussion
Topic: RTOS running on one core only
Replies: 37
Views: 51805

Re: RTOS running on one core only

Some links to cooperative multitasking: --------------------------------------- Good entry points with references to most Languages/Compilers: https://en.wikipedia.org/wiki/Coroutine https://en.wikipedia.org/wiki/Green_threads One wellknown name in the community: https://kennykerr.ca/2012/08/03/ligh...
by HelWeb
Mon Apr 08, 2019 6:35 am
Forum: General Discussion
Topic: RTOS running on one core only
Replies: 37
Views: 51805

Re: RTOS running on one core only

In fact I can take the programs written for an original Arduino Uno and CoopOS. Then I write some #defines to replace DigitalWrite etc. And I have to replace the routine micros() to get the time. Thats all! Then I can use the same old libraries and let 10 LEDs blink with 100 Hz. No other changes are...
by HelWeb
Mon Apr 08, 2019 5:41 am
Forum: General Discussion
Topic: RTOS running on one core only
Replies: 37
Views: 51805

Re: RTOS running on one core only

I can replace the xTaskCreateStaticPinnedToCore( to a normal xTaskCreate without make any other changes. The effect: I dont know, which core is used and I get breaks from preemption. Thats all. IT IS AN RTOS TASK - but this task behaves like an OS - because it is able to run without any other OS. It...
by HelWeb
Mon Apr 08, 2019 5:09 am
Forum: General Discussion
Topic: RTOS running on one core only
Replies: 37
Views: 51805

Re: RTOS running on one core only

To make a long story short: CoopOS is a normal RTOS task and it has to accept and handle all the rules for registers, pointers etc. and uses the RTOS-API to manage all these things. On the other side: it has own timers and must not do RTOS-taskswitches and is never preempted, because it is pinned to...
by HelWeb
Mon Apr 08, 2019 4:51 am
Forum: General Discussion
Topic: RTOS running on one core only
Replies: 37
Views: 51805

Re: RTOS running on one core only

The first row are the CoopOS Scheduler calls. No ticks no - breaks. Line 2 - 4: CoopOS squarewaves produced with different priorities from highest to lowest. Last Line: RTOS pure taskswitches. More deterministic and fast: 2 microseconds. But you have to live with breaks due to taskswitches, because ...
by HelWeb
Mon Apr 08, 2019 4:41 am
Forum: General Discussion
Topic: RTOS running on one core only
Replies: 37
Views: 51805

Re: RTOS running on one core only

As you can see: The longest time a task used in one piece is 13 microseconds - the output of the tasklist. The first task with priority 99 builds the squarewave of the next picture. Of course there are better ways to build a square wave. Its a demonstration to show, that CoopOS can do sometihing eve...