Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 19:48 27 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Disable an interrupt?

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9063
Posted: 05:10pm 08 Jul 2013
Copy link to clipboard 
Print this post

Hi all.


Still playing with my interrupts.

Once you have set one up on the COM port, how do you temporarily disable it?

The manual, page 7, right at the bottom says: "Also remember to disable an interrupt when you have finished needing it - background interrupts can cause strange and non-intuitive bugs."

...we will say nothing of the other problem I was having...(DO/LOOPS thread)


Anyhow, in the case of the serial port, do I just CLOSE the port, and the interrupt is then disabled?

I am guessing this is the way to do it, but as I have made assumptions like this before, I thought I should ask.

So, I would assume that if I close the port, the interrupt will be cancelled, as there is no valid open port for it to work with once the port is closed.

I can then just re-open the port again with the interrupt when I need it - correct?

Smoke makes things work. When the smoke gets out, it stops!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 07:15pm 08 Jul 2013
Copy link to clipboard 
Print this post

  Grogster said  So, I would assume that if I close the port, the interrupt will be cancelled, as there is no valid open port for it to work with once the port is closed.

I can then just re-open the port again with the interrupt when I need it - correct?

Yes, that is exactly correct.

Geoff

P.S. It is a change to see others creating bugs rather than me.
Geoff Graham - http://geoffg.net
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024