Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Antori91
#76357 Assuming that your Arduino code doesn't use interruptions at all, can your code nevertheless be interrupted by someone else (By someone, I mean a low level routine like WiFi for example).
User avatar
By QuickFix
#76363 No, yes... sort of...

Your WiFi-stack needs to have some processing time every once in a while, you can allow this by putting in some yields or delays in your code.
However if you don't, a watchdog will time-out and reset your ESP.

So no: the WiFi stack won't interrupt the flow of your code, but if you don't give it some processing time yourself, it will "Force a giant interrupt" (ie. a reset). 8-)

But, you're asking this question for a reason, so please enlighten us with some context. ;)
User avatar
By Antori91
#76364 I know that the low level routines (like WiFi and others) must run from time to time (if not the watchdogs will bite you). From what I've read, these low level routines are called when your code calls delay() for example and they are also called automatically at the beginning of each new loop() iteration.
To come back to my question, assuming
- first, a (short) part of my code must not be interrupted,
- secondly my code doesn't use at all interruptions,
do I have to use noInterrupts() ?
User avatar
By McChubby007
#76366
Antori91 wrote:I know that the low level routines (like WiFi and others) must run from time to time (if not the watchdogs will bite you). From what I've read, these low level routines are called when your code calls delay() for example and they are also called automatically at the beginning of each new loop() iteration.
To come back to my question, assuming
- first, a (short) part of my code must not be interrupted,
- secondly my code doesn't use at all interruptions,
do I have to use noInterrupts() ?

It's more complicated than that - interrupts occur whether your code 'uses' them or not. Timer (sys clock), possibly device i/o such as uart or wi-fi, which are not necessarily triggered by your code.