Hello.
Are you using any components or delays within interrupts?
If your Project is different to the one you posted above, then can you post your project on here.
error or bug
-
- Matrix Staff
- Posts: 1988
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 630 times
- Been thanked: 660 times
-
- Matrix Staff
- Posts: 1988
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 630 times
- Been thanked: 660 times
Re: error or bug
Hello from the project you sent me via PM it is what I thought.
You should not be using any delays within interrupts.
What will make it worse if you uses delays in both interrupts and non interrupts,
Or any other duplicated components ports etc
That will trigger a non-reentrant function.
You need to take notice of what is being duplicated.
E.g. _delay_s or _delay_ms.
It's a warning that bad programming has taken place and if you don't sort the warnings out by removing the offending items, then hardware will crash.
It's not a bug.
It would be more worrying to me, the compiler on a different computer did not show you the message.
Are you sure you are using the exact same code?
Martin was spot on with what he stated:
You should not be using any delays within interrupts.
What will make it worse if you uses delays in both interrupts and non interrupts,
Or any other duplicated components ports etc
That will trigger a non-reentrant function.
You need to take notice of what is being duplicated.
E.g. _delay_s or _delay_ms.
It's a warning that bad programming has taken place and if you don't sort the warnings out by removing the offending items, then hardware will crash.
It's not a bug.
It would be more worrying to me, the compiler on a different computer did not show you the message.
Are you sure you are using the exact same code?
Martin was spot on with what he stated:
I'm moving this topic from bugs.mnfisher wrote: ↑Fri Jun 20, 2025 7:28 pmThis happens if the function cannot be interrupted and then restarted.
Common issues are use of global variables, hardware registers or (less likely here) static local variables.
Calling routines that require some saved state from ISRs etc will cause issues and is not a good idea.
Martin
Martin
-
- Posts: 143
- Joined: Wed Dec 02, 2020 3:59 pm
- Has thanked: 26 times
- Been thanked: 9 times
Re: error or bug
Hello Martin & Martin Mnfisher
Yes, is the same code.
Okay, I understand; I haven't seen these messages on any computer until the latest patches. So I need to update the other computers so they compile correctly and warn me of any incorrect data.
For this reason I did not believe what Martin (Mnfisher) suggested to me to be logical, on computers before updating it did not generate messages, I thought that the update had generated that failure in the compiler; I apologize for that to Martin (Mnfisher)
Two question. . . . I have 1 circuit assembled with that programming and installed in my house that is working correctly and has been connected for 1 month, what would be the probability that it could present that irregularity
At the end of the compilation, it displayed the message: everything is correct. There is still a risk
Compilation successful!
.
Using <PICKIT3> user settings for linker
Launching the linker/assembler...
FINISHED
I only have one second question: In an example published in Flowcode 10; IOC counter, when you compile it, it generates a similar message.
Thank you for taking the time.
Best Regards
Enrique
Yes, is the same code.
Okay, I understand; I haven't seen these messages on any computer until the latest patches. So I need to update the other computers so they compile correctly and warn me of any incorrect data.
For this reason I did not believe what Martin (Mnfisher) suggested to me to be logical, on computers before updating it did not generate messages, I thought that the update had generated that failure in the compiler; I apologize for that to Martin (Mnfisher)


Two question. . . . I have 1 circuit assembled with that programming and installed in my house that is working correctly and has been connected for 1 month, what would be the probability that it could present that irregularity

At the end of the compilation, it displayed the message: everything is correct. There is still a risk

Compilation successful!
.
Using <PICKIT3> user settings for linker
Launching the linker/assembler...
FINISHED
I only have one second question: In an example published in Flowcode 10; IOC counter, when you compile it, it generates a similar message.
Thank you for taking the time.
Best Regards
Enrique
- Attachments
-
- 3.jpeg (173.31 KiB) Viewed 257 times
-
- IOC_Pulse_Counter.fcfx
- (21.33 KiB) Downloaded 6 times
-
- Matrix Staff
- Posts: 1988
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 630 times
- Been thanked: 660 times
Re: error or bug
Hello.
The compiler is warning you because it sees the same piece of code (the one that reads or writes the whole port) being used both in your main program and inside an interrupt. It does this to make sure you don’t ever run that code in both places at once, which could corrupt data.
In your IOC_Pulse_Counter.fcfx, you call that port-access code once before you turn on interrupts, and after that it only runs inside the interrupt. Since it never executes in both contexts at the same time, you’re safe—so you can ignore the warning
The compiler is warning you because it sees the same piece of code (the one that reads or writes the whole port) being used both in your main program and inside an interrupt. It does this to make sure you don’t ever run that code in both places at once, which could corrupt data.
In your IOC_Pulse_Counter.fcfx, you call that port-access code once before you turn on interrupts, and after that it only runs inside the interrupt. Since it never executes in both contexts at the same time, you’re safe—so you can ignore the warning
Martin
-
- Posts: 143
- Joined: Wed Dec 02, 2020 3:59 pm
- Has thanked: 26 times
- Been thanked: 9 times