Use of SETINT

f2cf1g

Member
I am attempting to protect code in the main body of my program from interference from interrupts by using SETINT OFF-SETINT (on) around the critical section. This appears to cause a lock-up in the interrupt system which I am having difficulty diagnosing. Is this an acceptable use of SETINT?
Cheers
Roy
 

nick12ab

Senior Member
I can see no reason why it locks up.

Can you post your entire code? It's possible that another command is causing the lockup instead.

If you're only disabling the interrupt for one command like readtemp or hi2cin then you don't need the interrupt at all since it is a polled interrupt so is only checked before and after.

Have you got decoupling capacitors fitted.
 

f2cf1g

Member
Thanks for the reassurance. Of course, the coding error has now revealed itself and all is well again.
 
Top