MIMXRT1170 Interrupt issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MIMXRT1170 Interrupt issue

Jump to solution
2,626 Views
muratokusluk
Contributor II

Hi Everyone,

I want to ask something about GPIO external interrupt. In the MIMXRT1170_igpio_input_interrupt example, GPIO13_io0 pin is defined as input and is enabled rising edge interrupt. I want to GPIO8_io29 instead of GPIO13_io0. But I can't see any interrupt handler for gpio8.

How can I define gpio8_29 as external interrupt?

 

0 Kudos
Reply
1 Solution
2,571 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @muratokusluk,

Although most of the pins are accessible by both the CM7 domain and the CM4 domain, GPIO7 through GPIO12 are all accessible only by the CM4 domain:

EdwinHz_5-1707351396046.png


GPIO8 is therefore only intended for CM4 access, so it does not have a CM7 interruption. Note how "Table 4-2. CM4 domain interrupt summary" from the Reference Manual has GPIO7 through GPIO11 on IRQ 99:

EdwinHz_6-1707351403332.png

But "Table 4-1. CM7 domain interrupt summary" has CM7_GPIO2 and CM7_GPIO3 IRQs instead:

EdwinHz_7-1707351418503.png

That said, GPIO_EMC_B2_19, which is the pad that routes GPIO8_IO29, also routes GPIO_MUX2_IO29 when using alt function 5 rather than 10:

EdwinHz_8-1707351431130.png
EdwinHz_9-1707351431131.png

Therefore, you can configure the pad and interruption for GPIO8 with IRQ 99 when using CM4 or configure the same pad and interruption for CM7_GPIO2 when using CM7, and the IRQ will continue being IRQ 99 (CM7_GPIO2).

If you base your project on ipgio_input_interrupt_cm4 rather than cm7, you will find "GPIO7_8_9_10_11_IRQHandler()" on startup_mimxrt1176_cm4.c

I hope this answers your question.

 

BR,
Edwin.

View solution in original post

4 Replies
2,379 Views
Artos
Contributor I

I encountered the same problem. Is there any progress?

0 Kudos
Reply
2,535 Views
muratokusluk
Contributor II

Thanks Edwin, I understand

0 Kudos
Reply
2,572 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @muratokusluk,

Although most of the pins are accessible by both the CM7 domain and the CM4 domain, GPIO7 through GPIO12 are all accessible only by the CM4 domain:

EdwinHz_5-1707351396046.png


GPIO8 is therefore only intended for CM4 access, so it does not have a CM7 interruption. Note how "Table 4-2. CM4 domain interrupt summary" from the Reference Manual has GPIO7 through GPIO11 on IRQ 99:

EdwinHz_6-1707351403332.png

But "Table 4-1. CM7 domain interrupt summary" has CM7_GPIO2 and CM7_GPIO3 IRQs instead:

EdwinHz_7-1707351418503.png

That said, GPIO_EMC_B2_19, which is the pad that routes GPIO8_IO29, also routes GPIO_MUX2_IO29 when using alt function 5 rather than 10:

EdwinHz_8-1707351431130.png
EdwinHz_9-1707351431131.png

Therefore, you can configure the pad and interruption for GPIO8 with IRQ 99 when using CM4 or configure the same pad and interruption for CM7_GPIO2 when using CM7, and the IRQ will continue being IRQ 99 (CM7_GPIO2).

If you base your project on ipgio_input_interrupt_cm4 rather than cm7, you will find "GPIO7_8_9_10_11_IRQHandler()" on startup_mimxrt1176_cm4.c

I hope this answers your question.

 

BR,
Edwin.

553 Views
mimlo
Contributor IV

Hi @EdwinHz,
I recently saw this answer you gave and started wondering whether it's actually true as something was off for me.

You stated that "GPIO7 through GPIO12 are all accessible only by the CM4 domain", so I started looking through RM and I found the following:

mimlo_0-1758538529495.png

mimlo_1-1758538549273.png


The description of AIPS-4 clearly says that this memory map range is accessible by both CM7 and CM4 cores. So from my understanding, it stands in contradiction with what you stated some time ago.

What is more, I think the Bus Diagram that you pasted, actually has a bus connection to the GPIO[12-7] through the following route (provided that my understanding is correct):

mimlo_2-1758539110096.png

I sort of assumed the flow looks like that based on the information from RM that says those PGIOs are accessible. Please correct me if I'm wrong but something is definitely off and I feel it should be straightened out.

Best Regards,
Michael

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1800643%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMIMXRT1170%20Interrupt%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1800643%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Everyone%2C%3C%2FP%3E%3CP%3EI%20want%20to%20ask%20something%20about%20GPIO%20external%20interrupt.%20In%20the%20MIMXRT1170_igpio_input_interrupt%26nbsp%3Bexample%2C%20GPIO13_io0%20pin%20is%20defined%20as%20input%20and%20is%20enabled%20rising%20edge%20interrupt.%20I%20want%20to%20GPIO8_io29%20instead%20of%20GPIO13_io0.%20But%20I%20can't%20see%20any%20interrupt%20handler%20for%20gpio8.%3C%2FP%3E%3CP%3EHow%20can%20I%20define%20gpio8_29%20as%20external%20interrupt%3F%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2173524%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MIMXRT1170%20Interrupt%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2173524%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F186731%22%20target%3D%22_blank%22%3E%40EdwinHz%3C%2FA%3E%2C%3CBR%20%2F%3EI%20recently%20saw%20this%20answer%20you%20gave%20and%20started%20wondering%20whether%20it's%20actually%20true%20as%20something%20was%20off%20for%20me.%3CBR%20%2F%3E%3CBR%20%2F%3EYou%20stated%20that%20%22GPIO7%20through%20GPIO12%20are%20all%20accessible%20only%20by%20the%20CM4%20domain%22%2C%20so%20I%20started%20looking%20through%20RM%20and%20I%20found%20the%20following%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22mimlo_0-1758538529495.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22mimlo_0-1758538529495.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F357956i5C1902674262E70C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22mimlo_0-1758538529495.png%22%20alt%3D%22mimlo_0-1758538529495.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22mimlo_1-1758538549273.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22mimlo_1-1758538549273.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F357957iB1A7DBF091B8F8D1%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22mimlo_1-1758538549273.png%22%20alt%3D%22mimlo_1-1758538549273.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EThe%20description%20of%20AIPS-4%20clearly%20says%20that%20this%20memory%20map%20range%20is%20accessible%20by%20both%20CM7%20and%20CM4%20cores.%20So%20from%20my%20understanding%2C%20it%20stands%20in%20contradiction%20with%20what%20you%20stated%20some%20time%20ago.%3CBR%20%2F%3E%3CBR%20%2F%3EWhat%20is%20more%2C%20I%20think%20the%20%3CSTRONG%3EBus%20Diagram%3C%2FSTRONG%3E%20that%20you%20pasted%2C%20actually%20has%20a%20bus%20connection%20to%20the%20%3CSTRONG%3EGPIO%5B12-7%5D%3C%2FSTRONG%3E%20through%20the%20following%20route%20(provided%20that%20my%20understanding%20is%20correct)%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22mimlo_2-1758539110096.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22mimlo_2-1758539110096.png%22%20style%3D%22width%3A%20382px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F357960iA774410E97D2251B%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22mimlo_2-1758539110096.png%22%20alt%3D%22mimlo_2-1758539110096.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI%20sort%20of%20assumed%20the%20flow%20looks%20like%20that%20based%20on%20the%20information%20from%20RM%20that%20says%20those%20PGIOs%20are%20accessible.%20Please%20correct%20me%20if%20I'm%20wrong%20but%20something%20is%20definitely%20off%20and%20I%20feel%20it%20should%20be%20straightened%20out.%3CBR%20%2F%3E%3CBR%20%2F%3EBest%20Regards%2C%3CBR%20%2F%3EMichael%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1868078%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MIMXRT1170%20Interrupt%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1868078%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CP%3EI%20encountered%20the%20same%20problem.%20Is%20there%20any%20progress%3F%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1805231%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MIMXRT1170%20Interrupt%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1805231%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThanks%20Edwin%2C%20I%20understand%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1803752%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MIMXRT1170%20Interrupt%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1803752%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F229047%22%20target%3D%22_blank%22%3E%40muratokusluk%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EAlthough%20most%20of%20the%20pins%20are%20accessible%20by%20both%20the%20CM7%20domain%20and%20the%20CM4%20domain%2C%20GPIO7%20through%20GPIO12%20are%20all%20accessible%20only%20by%20the%20CM4%20domain%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22EdwinHz_5-1707351396046.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22EdwinHz_5-1707351396046.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F262420iBA3CCCC46AC18FDE%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22EdwinHz_5-1707351396046.png%22%20alt%3D%22EdwinHz_5-1707351396046.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EGPIO8%20is%20therefore%20only%20intended%20for%20CM4%20access%2C%20so%20it%20does%20not%20have%20a%20CM7%20interruption.%20Note%20how%20%22Table%204-2.%20CM4%20domain%20interrupt%20summary%22%20from%20the%20Reference%20Manual%20has%20GPIO7%20through%20GPIO11%20on%20IRQ%2099%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22EdwinHz_6-1707351403332.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22EdwinHz_6-1707351403332.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F262421i75AD6ADA526F7C3A%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22EdwinHz_6-1707351403332.png%22%20alt%3D%22EdwinHz_6-1707351403332.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EBut%20%22Table%204-1.%20CM7%20domain%20interrupt%20summary%22%20has%20CM7_GPIO2%20and%20CM7_GPIO3%20IRQs%20instead%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22EdwinHz_7-1707351418503.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22EdwinHz_7-1707351418503.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F262422i5D33A09E352C5514%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22EdwinHz_7-1707351418503.png%22%20alt%3D%22EdwinHz_7-1707351418503.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThat%20said%2C%20GPIO_EMC_B2_19%2C%20which%20is%20the%20pad%20that%20routes%20GPIO8_IO29%2C%20also%20routes%20GPIO_MUX2_IO29%20when%20using%20alt%20function%205%20rather%20than%2010%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22EdwinHz_8-1707351431130.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22EdwinHz_8-1707351431130.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F262423iD26B097142FA7FE2%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22EdwinHz_8-1707351431130.png%22%20alt%3D%22EdwinHz_8-1707351431130.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22EdwinHz_9-1707351431131.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22EdwinHz_9-1707351431131.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F262424i5A83AF021A6C1238%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22EdwinHz_9-1707351431131.png%22%20alt%3D%22EdwinHz_9-1707351431131.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ETherefore%2C%20you%20can%20configure%20the%20pad%20and%20interruption%20for%20GPIO8%20with%20IRQ%2099%20when%20using%20CM4%20or%20configure%20the%20same%20pad%20and%20interruption%20for%20CM7_GPIO2%20when%20using%20CM7%2C%20and%20the%20IRQ%20will%20continue%20being%20IRQ%2099%20(CM7_GPIO2).%3C%2FP%3E%0A%3CP%3EIf%20you%20base%20your%20project%20on%20ipgio_input_interrupt_cm4%20rather%20than%20cm7%2C%20you%20will%20find%20%22GPIO7_8_9_10_11_IRQHandler()%22%20on%20startup_mimxrt1176_cm4.c%3C%2FP%3E%0A%3CP%3EI%20hope%20this%20answers%20your%20question.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBR%2C%3CBR%20%2F%3EEdwin.%3C%2FP%3E%3C%2FLINGO-BODY%3E