{"id":649,"date":"2015-06-18T07:45:15","date_gmt":"2015-06-18T07:45:15","guid":{"rendered":"https:\/\/ibex.tech\/embedded\/?p=649"},"modified":"2022-02-18T15:37:48","modified_gmt":"2022-02-18T15:37:48","slug":"int-pin-irqs","status":"publish","type":"post","link":"https:\/\/ibex.tech\/embedded\/microchip\/pic32\/xc32-v2-old\/interrupts-xc32\/int-pin-irqs","title":{"rendered":"INT Pin IRQs"},"content":{"rendered":"<h4>\nInterrupt based INT pin handler<br \/>\n<\/h4>\n<pre>\r\n<code>\r\n\t\/\/----- SETUP INT 0 PIN -----\r\n\tConfigINT0(EXT_INT_PRI_7 | RISING_EDGE_INT | EXT_INT_ENABLE);\t\t\/\/Priority, edge trigger, enable.  This also clears the irq flag\r\n\r\n<\/code><\/pre>\n<p>\n&nbsp;\n<\/p>\n<pre>\r\n<code>\r\n\/\/**********************************\r\n\/\/********** INT0 PIN IRQ **********\r\n\/\/**********************************\r\nvoid __ISR(_EXTERNAL_0_VECTOR, IPL7SOFT) External_Interrupt_0(void) \t\/\/(&lt;&lt;&lt;&lt;&lt;&lt;&lt; IPL# must match the priority level assigned to the irq where its enabed, Use &#39;SRS&#39; if config FSRSSEL is assigned to same level, or use &#39;SOFT&#39; if not)\r\n{\r\n\tmINT0ClearIntFlag();\t\t\/\/&lt;Clear the flag\r\n\r\n\r\n}\r\n<\/code><\/pre>\n<h4>\nGenerate INT Pin Interrupt In Code<br \/>\n<\/h4>\n<pre>\r\n<code>\r\n\tINTSetFlag(INT_INT0);\t\t\/\/Set interrupt request flag.\r\n<\/code><\/pre>\n<h4>\nCode based INT pin IRQ flag detect<br \/>\n<\/h4>\n<pre>\r\n<code>\r\n\t\/\/----- SETUP INT 4 PIN -----\r\n\tConfigINT4(EXT_INT_PRI_1 | FALLING_EDGE_INT | EXT_INT_DISABLE);\t\t\/\/Priority, edge trigger, enable.  This also clear the irq flat\r\n\t\/\/if (mINT4GetIntFlag())\r\n\t\/\/{\r\n\t\/\/\tmINT4ClearIntFlag();\t\t\t\/\/Reset the flag\r\n\t\/\/}\r\n<\/code><\/pre>\n<p>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Interrupt based INT pin handler \/\/&#8212;&#8211; SETUP INT 0 PIN &#8212;&#8211; ConfigINT0(EXT_INT_PRI_7 | RISING_EDGE_INT | EXT_INT_ENABLE); \/\/Priority, edge trigger, enable. This also clears the irq flag &nbsp; \/\/********************************** \/\/********** INT0 PIN IRQ ********** \/\/********************************** void __ISR(_EXTERNAL_0_VECTOR, IPL7SOFT) External_Interrupt_0(void) \/\/(&lt;&lt;&lt;&lt;&lt;&lt;&lt; IPL# must match the priority level assigned to the irq where its enabed, Use &#39;SRS&#39; if [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59],"tags":[],"class_list":["post-649","post","type-post","status-publish","format-standard","hentry","category-interrupts-xc32"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/comments?post=649"}],"version-history":[{"count":6,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/649\/revisions"}],"predecessor-version":[{"id":731,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/649\/revisions\/731"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/media?parent=649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/categories?post=649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/tags?post=649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}