Hello,
I have a question I'm passing along on behalf of my developer, who is working on a QNX resource manager (driver) for the GPIO of the AM62x. We're having some issues in getting the GIC interrupt to fire and are hoping for some guidance on a setting or configuration we might be missing. I'll just paste his summary and detailed examples below. Any help identifying what we're missing will be appreciated, and let me know if we need to provide any more details.
Thank you,
Courtney Tunnicliffe
I am having trouble getting the GIC interrupt to fire. I think that I am missing some sort of configuration related to the GPIOMUX_INTROUTER. I have tried setting bits 7:0 to both the pin and the bank numbers but neither triggers an interrupt. In TRM it reads as if both the input and output need to be configured but only one register exists as far as I could find. MAIN_GPIOMUX_INTROUTER_INTR_ROUTER_CFG_MUXCNTL. I set bits 7:0 for the source and bit 16 for the enable. I'm assuming that 0-16 outputs to the GIC/R5FSS are set in this register. Anything past 32 offsets from the GPIOMUX_INTEROUTER is no longer writable so I am confused on where I should configure the input side of the MUX.
As an example where we can't configure GPIO interrupt for GPIO0_42 on GIC:
- configure GPIO0_42 module
Set the per bank GPIO int: (gpio0 pin 42 is my target)
# io 32 0x000600008
0x0000000000600008: 0x00000004
Set the direction of the pin: (pin 32 is an output for toggling)
# io 32 0x000600038
0x0000000000600038: 0xFFFFFFFE
Set the rising edge trigger:
# io 32 0x00060004c
0x000000000060004C: 0x00000400
- Configure GPIOMUX_INTROUTER0:
TRM shows GIC values are 32-47
TRM shows GPIO_INTR reg's for GIC are 0-15
TRM shows GPIO IRQ numbers are 42 for pin 192 for bank 2 (I've tried both pin and bank)
Configure MAIN_GPIOMUX_INTROUTER_INTR_ROUTER_CFG_MUXCNTL:
# io 32 0x000a00004
0x0000000000A00004: 0x0001002A
OR
Configure MAIN_GPIOMUX_INTROUTER_INTR_ROUTER_CFG_MUXCNTL:
# io 32 0x000a00004
0x0000000000A00004: 0x000100C0
- Start a thread and attach to the GIC interrupt 32 (this is the first GPIO int on the GIC)
Note: I was able to get this receiver thread to work on the timer INT so I know it's not that
- Toggle output of pin 32 which is connected with a jumper to pin 42:
Note: I can see the pin logic go high on my scope
- Check to see if GIC interrupt fired (this never happens)
- Check GPIO edge trigger status:
# io 32 0x00060005c
0x000000000060005C: 0x00000400
The trigger event shows in the GPIO module but never triggers the GIC IRQ.