danke für den Tipp, aber leider: nein
Code:
void counter_loop() {
    static thread_local uint32_t counter = 0;
    while(true) {
        Serial.print("counter_loop: ");
        Serial.println(counter);
        std::this_thread::sleep_for(one_sec);
    }
}

void blinker_loop() {
    static thread_local uint32_t counter = 0;
    while(true) {
        digitalWrite(LED_BUILTIN, HIGH);
        Serial.print("blinker_loop (HIGH) counter: ");
        Serial.println(counter);
        std::this_thread::sleep_for(one_sec);
        
        digitalWrite(LED_BUILTIN, LOW);
        Serial.print("blinker_loop (LOW) counter: ");
        Serial.println(counter);
        std::this_thread::sleep_for(one_sec);
    }
}
main loop: 1
counter_loop: 0
blinker_loop (LOW) counter: 0
blinker_loop (HIGH) counter: 0
counter_loop: 0
counter_loop: 0
blinker_loop (LOW) counter: 0
blinker_loop (HIGH) counter: 0
counter_loop: 0
counter_loop: 0
blinker_loop (LOW) counter: 0
blinker_loop (HIGH) counter: 0
counter_loop: 0
counter_loop: 0
blinker_loop (LOW) counter: 0
blinker_loop (HIGH) counter: 0
counter_loop: 0
counter_loop: 0
blinker_loop (LOW) counter: 0
blinker_loop (HIGH) counter: 0
counter_loop: 0
main loop: 2
counter_loop: 0
blinker_loop (LOW) counter: 0
blinker_loop (HIGH) counter: 0
counter_loop: 0
counter_loop: 0
blinker_loop (LOW) counter: 0
blinker_loop (HIGH) counter: 0
counter_loop: 0
counter_loop: 0
blinker_loop (LOW) counter: 0
blinker_loop (HIGH) counter: 0
counter_loop: 0
counter_loop: 0
blinker_loop (LOW) counter: 0
blinker_loop (HIGH) counter: 0
counter_loop: 0
counter_loop: 0
blinker_loop (LOW) counter: 0
blinker_loop (HIGH) counter: 0
counter_loop: 0
main loop: 3
auch keine Änderung, wenn man dann das static wieder rausnimmt.