out-cs-bim 112 delay on start

Fragen und Diskussionen zu den Geräten. Sowohl Hardware als auch Software. English is welcome.
pete68
Beiträge: 57
Registriert: 14. Jun 2015, 10:12

out-cs-bim 112 delay on start

Beitrag von pete68 »

salve
c'è modo di ritardare la partenza del firmware, diciamo di 10 secondi? Ho provato a inserire delay(10000) in void setup() del file app_main.cpp ma l'esecuzione è lo stesso immediata.

grazie

Tags:
Doumanix
Beiträge: 508
Registriert: 7. Nov 2017, 16:33

Re: out-cs-bim 112 delay on start

Beitrag von Doumanix »

:D
Google übersetzt das so:
Gibt es eine Möglichkeit den Start der Firmware zu verzögern, sagen wir um 10 Sekunden? Ich habe versucht, eine Verzögerung (10000) in void setup () der Datei app_main.cpp einzufügen, aber die Ausführung ist sofort dieselbe.
Mirko
Beiträge: 135
Registriert: 13. Feb 2015, 15:41

Re: out-cs-bim 112 delay on start

Beitrag von Mirko »

deepl.com ist da etwas besser :)
hallo
Gibt es eine Möglichkeit, den Start der Firmware zu verzögern, z. B. um 10 Sekunden? Ich habe versucht, delay(10000) in void setup() der Datei app_main.cpp einzufügen, aber die Ausführung erfolgt immer noch sofort.
Marinux
Beiträge: 46
Registriert: 27. Dez 2018, 14:57

Re: out-cs-bim 112 delay on start

Beitrag von Marinux »

pete68, maybe we can agree to write in English?
pete68
Beiträge: 57
Registriert: 14. Jun 2015, 10:12

Re: out-cs-bim 112 delay on start

Beitrag von pete68 »

I realize that Italian is not exactly the most spoken language in the world but...
gnampf
Beiträge: 22
Registriert: 5. Mär 2021, 09:56

Re: out-cs-bim 112 delay on start

Beitrag von gnampf »

there are some architectures where such big delays aren't supported, so maybe try to do 100 times 100ms. But maybe there's a better solution if you tell us the reason for the delay
pete68
Beiträge: 57
Registriert: 14. Jun 2015, 10:12

Re: out-cs-bim 112 delay on start

Beitrag von pete68 »

Thanks for the reply.
My problem is the blocking of devices in case of blackout (I have more than one of these out-cs-bim 112 installed).
Maybe a conflict case, so I would like to start devices with different delays.
Doumanix
Beiträge: 508
Registriert: 7. Nov 2017, 16:33

Re: out-cs-bim 112 delay on start

Beitrag von Doumanix »

I don't get the point. What will be blocked in the case of a blackout? This is a normal use case (black out & restart of the whole installation) and in my opinion, this should cause no trouble.
pete68
Beiträge: 57
Registriert: 14. Jun 2015, 10:12

Re: out-cs-bim 112 delay on start

Beitrag von pete68 »

I had to modify the original project to use monostable relays. something is obviously wrong.
Mirko
Beiträge: 135
Registriert: 13. Feb 2015, 15:41

Re: out-cs-bim 112 delay on start

Beitrag von Mirko »

Hello pete68,
did you mean the delay() function of the sblib? It is coded a bit strange and would fall back to measuring microseconds instead of milliseconds if there is still an interrupt active. In this case the delay would be only 10ms...

Salve pete68,
intendevi la funzione delay() della sblib? È codificato in modo un po' strano e tornerebbe a misurare i microsecondi invece dei millisecondi se un interrupt è ancora attivo. In questo caso il ritardo sarebbe solo di 10ms...

Code: Alles auswählen

void delay(unsigned int msec)
{
    unsigned int lastSystemTime = systemTime;

    if (__get_IPSR() == 0x0) // check that no interrupt is active, otherwise "while" will end in a infinite loop
    {
        while (msec)
        {
            if (lastSystemTime == systemTime)
            {
                __WFI();
            }
            else
            {
                lastSystemTime = systemTime;
                --msec;
            }
        }
    }
    else
    {
        // fall-back to waiting SysTick's
        delayMicroseconds(msec);
    }
}
Antworten