out-cs-bim 112 delay on start
Re: out-cs-bim 112 delay on start
So this seems to be a bug, it should then wait 1000 * msec.
But calling delay from inside an IRQ isn't a great idea anyways, as all other IRQs are blocked by that also. If the IRQ has to wait, it would better reactive other IRQs (if thats possible on the ARM), which would also reenable the timer irq, or hand the action over to the main loop by setting some flag.
Calling it from outside an IRQ should'nt be a problem, even if there are IRQs pending (which you wouldn't notice, as they then would have get called). But of course it would be a problem if IRQs are disabled, and so the timer irq would not work. I'm not sure if IRQs are already enabled in setup?
But calling delay from inside an IRQ isn't a great idea anyways, as all other IRQs are blocked by that also. If the IRQ has to wait, it would better reactive other IRQs (if thats possible on the ARM), which would also reenable the timer irq, or hand the action over to the main loop by setting some flag.
Calling it from outside an IRQ should'nt be a problem, even if there are IRQs pending (which you wouldn't notice, as they then would have get called). But of course it would be a problem if IRQs are disabled, and so the timer irq would not work. I'm not sure if IRQs are already enabled in setup?
Re: out-cs-bim 112 delay on start
@gnampf: I agree that this is a bug, but 1000*msec would not work reliably because delayMicroseconds() takes an unsigned int but uses signed int internally. So the maximum delay could be 44739ms. We should discuss this more in depth in Slack.
Re: out-cs-bim 112 delay on start
@pete68: Please try delayMicroseconds(10000000). This should work for usec < 44,739,244 for now.
Re: out-cs-bim 112 delay on start
Hello pete68,
AFAIK, the out-cs-bim112 only supports bi-stable relays.
I just tested in out-cs-bim112 -> app_main.cpp:
which worked as excpected, but is not the best place for a delay.
A better solution would be to change in config.h
(milliseconds)
Greetings
Denis
It would be quite helpful, if you could provide your code changes as a *.patch file or your changed .cpp/.h files.
AFAIK, the out-cs-bim112 only supports bi-stable relays.
I just tested in out-cs-bim112 -> app_main.cpp:
Code: Alles auswählen
void setup()
{
delay(10000); //wait 10 seconds
for (unsigned ipno=0; ipno<8; ipno++)
A better solution would be to change in config.h
Code: Alles auswählen
#define STARTUPWAITTIME 1000
Greetings
Denis
5x in16-bim112 ARM | 1x rol-jal-bim112 ARM | 2x MSA | 1x raincenter-bim112 ARM | 8x Kombisensor LPC | 1x out8 LPC | 2x 2in2out LPC
Re: out-cs-bim 112 delay on start
5x in16-bim112 ARM | 1x rol-jal-bim112 ARM | 2x MSA | 1x raincenter-bim112 ARM | 8x Kombisensor LPC | 1x out8 LPC | 2x 2in2out LPC