Other Parts Discussed in Thread: SYSCONFIG
Hi,
I am trying to snap the encoderdata (EQEP) and a timestamp (by ECAP module) for 4 external devices. For this purpose, I would run a trigger line from each device to the EQEP and ECAP modules via an OR-Gutter so each device can trigger a value capturing.
Additionally I would route each signal to its own GPIO with its own ISR. So I could then query the last caputured values from the modules in the ISRs. The distinction between who has just triggered is then made by the fact that each device receives its own ISR.
So I know with sysconfig I can setup bank interrupts and I also managed to use two of them to trigger two different ISRs. But I don't have the free choice of GPIOs and can simply use one pin from each of 4 different banks, so I need direct GPIO interrupts here.
I already searched through the e2e and found the possibility two differ which pin triggered a bank interrupt by checking the intrStatus, but with this solution it can happen that a trigger signal can be ignored when it comes in shortly after an other or simultaniously to it. (e2e entry)
intrStatus = GPIO_getBankIntrStatus(gGpioBaseAddr, bankNum); if(intrStatus & GPIO_GET_BANK_BIT_MASK(GPIO_PUSH_BUTTON_PIN)) { gGpioIntrDone1++; } /* Per pin interrupt handling */ if(intrStatus & GPIO_GET_BANK_BIT_MASK(GPIO_PUSH_BUTTON_2_PIN)) { gGpioIntrDone2++; }
Second approach: In the same forum entry I found the possibility to define a direct GPIO interrupt by defining the pin-Nr as the interrupt source in the Sciclient IRQ set function
// line, generated by sysconfig when activaing a bank interrupt rmIrqReq.src_index = TISCI_BANK_SRC_IDX_BASE_GPIO1 + GPIO_GET_BANK_INDEX (56); // suggestion for switching to a GPIO interrupt rmIrqReq.src_index = GPIO_PIN_NUMBER; // e.g. for GPIO1_56 -> "56"
I tried that, but it only worked when the function for activating the bank interrupt is used. But at first I accepted it. The main thing is that I can define several GPIO triggered ISRs
GPIO_bankIntrEnable(TriggerPinGpioBaseAddr, GPIO_GET_BANK_INDEX(TRIGGER_PIN));
But when trying to set up a second GPIO interrupt with its own ISR, only the first ISR is called.
I will set up my test again and submit it here soon.
Currently using:
- SDK Version: 08.06.00
- CCS 12.05
Best regards,
Ronny