This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2642R: Level Triggered Interrupt

Part Number: CC2642R
Other Parts Discussed in Thread: SIMPLELINK-CC13X2-26X2-SDK, SYSCONFIG

Hello,

Device: CC2642R

SDK: 4.20.00.35

I'm trying to utilize level triggered interrupts in my project.

To start out, I imported the gpiointerrupt example project from the SDK. The example is setup to use edge triggered interrupts, which work as expected. However, when I switch the pin configuration to be a level triggered interrupt (using GPIO_CFG_IN_INT_LOW or GPIO_CFG_IN_INT_HIGH), the interrupts never trigger.

I also tried configuring the level interrupt using syscfg, which didn't work either.

Am I missing something?

Does the CC2642R support level interrupts? It seems odd that that syscfg and the driver APIs support configuration of a pin as a level triggered interrupt if they are not supported. 

Thanks,

-MT

  • Hello MT,

    Based on the description of IOCFGn in the TRM and GPIOCC26XX/PINCC26XX TI Driver files from source\ti\drivers, only edge interrupts are supported for SIMPLELINK-CC13X2-26X2-SDK devices.  I will confirm this with the TI Drivers Development Team.  Meanwhile, what do you need level interrupts for?  Would it be possible to use edge interrupts to accomplish your needs?

    Regards,
    Ryan

  • Hi Ryan,

    I see. This was my suspicion this since the TRM only mentions edge detection, but doesn't mention level detection.

    It's confusing because the GPIO API documentation shows level interrupts as a configuration option. However, I now see that this is the common driver interface (GPIO.h) to the device specific driver itself (GPIOCC26XX.c/.h) as you indicated. It would be helpful if the API documentation described this, that all features may not be supported. Now that I understand this, I checked the device specific GPIO driver source file and agree with you that it seems as though level interrupts are not supported. It's curious that the GPIO_setConfig function still returns success if a level interrupt is attempted to be configured. 

    I wanted to use level interrupts as I will be enabling/disabling the interrupt depending on the state of my project. If the pin level changes while the interrupt disabled, then when the interrupt is re-enabled, the edge won't be detected as the pin level has already changed.

    -MT

  • I agree that the resources are contradictory and am providing feedback so that modifying the SysConfig settings or TI Driver documentation and return values could make the expected behavior more apparent.

    For your application, I recommend that you read the pin value immediately after re-enabling interrupts and determine further action if the pin level had changed while the interrupt was disabled.

    Regards,
    Ryan

  • The changes sound like they'd be helpful.

    Thanks for the recommendation, I had similar thoughts as well. 

    Thanks for all your help on this issue!