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.

LAUNCHXL-CC1352P: Is the number of buttons limited?

Part Number: LAUNCHXL-CC1352P

Hi,

I am using some code form no-Rtos LEDs and buttons example.

Custom board in Configsys.

I am trying to read 6 buttons.  5 buttons work well. When I add the 6th one, it does not work. Callback on the 6th is ignored.

I have increased number of buttons in #define to 6 or 7 - no luck.

If I comment out oppening of any one of 6 buttons  all the other 5 work well, including my number 6 .

Is there some limit for the number of buttons in the Button library? If yes, how can I change it?

I did appreciated the simple access this library provides to clicks, double clicks etc.

Thanks,

Regards ,

Edward.

  • Hi,

    We will look into it and get back to you ASAP. Please bear with us.

    Thanks,

    PM

  • Hi PM,

    Thanks.

    Edward.

  • Hi,

    There is not limit to number buttons you can hook up.

    Which particular example are you using from the SDK?

    Thanks,

  • Hi,

    I am going to go ahead and close this issue. If you are still having a problem, feel free to re-open, or if the thread is locked create a new one.

    Thanks,

    Riz

  • Hi Riz,

    Thanks for the answer, I missed the previous one.

    What I did was just reduced the number of buttons in my project. The question "Why I am not able to add the 6th button" remains open. The example I am using is no-RTOS  rfPacketTx with #include <ti/drivers/apps/Button.h>.

    I have attached the project. 

    When I add the 6th button it works, but one of the original 5 stops working.

    Regards,

    Edward.

    Remote.zip

  • Hi,

    I tested interrupts on 6 IOs without issues. All interrupts were firing. I used low level driverLib APIs to build the code.

    You can use the following setup code to test. Note: this is only setup for one GPIO, add more IOs in similar fashion

    #define EXAMPLE_IOID_EDGE1         IOID_14
    ..
    ...
    // Power up the periph domain and wait for it to become available. 
        //
        PRCMPowerDomainOn(PRCM_DOMAIN_PERIPH);
        while(PRCMPowerDomainStatus(PRCM_DOMAIN_PERIPH) != PRCM_DOMAIN_POWER_ON); 
        
        //
        // Enable GPIO module and wait for it to be ready
        //
        PRCMPeripheralRunEnable(PRCM_PERIPH_GPIO);
        PRCMLoadSet();
        while(!PRCMLoadGet())
        { }
      
      
        //
        // Set GPIO as input.
        // Pin is configured with internal pull-up, edge detect on falling edge
        // and interrupt enable on edge detection.
        //
    
        IOCPinTypeGpioInput(EXAMPLE_IOID_EDGE1);
        IOCIOPortPullSet(EXAMPLE_IOID_EDGE1, IOC_IOPULL_UP);
        IOCIOIntSet(EXAMPLE_IOID_EDGE1, IOC_INT_ENABLE, IOC_FALLING_EDGE);
        IOCIntEnable(EXAMPLE_IOID_EDGE1);
    
       
        // 
       GPIODirModeSet(EXAMPLE_GPIO_BTN, GPIO_DIR_MODE_IN);
    
        //
        // Enable the interrupt for edge detect
        //
        IntEnable(INT_AON_GPIO_EDGE);
        
        //
        // Enable processor interrupts
        //
        IntMasterEnable();
    
    // Interrupt handler is below:
    
    void
    GPIOIntHandler(void)
    {
        //
        // Clear the interrupt
        //
           IOCIntClear(EXAMPLE_IOID_EDGE1);
         //
        // Set an interrupt flag to indicate an interrupt has occurred.
        //
        g_bGPIOIntFlag = true;
    }

    Regards,

  • Hi FI,

    Thank you. It works this way.

    Regards,

    Edward.