2 Replies Latest reply on Mar 9, 2019 6:51 PM by MichaelF_56

    CYBT-423028-02 Interrupt Handlers Not Getting Called

    JoOr_4004241

      I have a CYBT-423028-EVAL board with CYBT-423028-02/CYW20719 dual mode Bluetooth BR/EDR + BLE module. I'm using WICED Studio 6.2 for software development. I have successfully built and tested several of the example applications for this board. However, I am not able to get an input button interrupt service routine (ISR) working. I'm using the snip.hal.gpio example that came with WICED Studio as a basis for my code. I put wiced_hal_gpio_get_pin_input_status() and WICED_BT_TRACE() calls in a loop in application_start() to verify that I'm using the correct pin ID and that the button is actually working.

       

      However, adding this code:

          wiced_hal_gpio_register_pin_for_interrupt(WICED_GPIO_PIN_BUTTON_1,

                                                    hal_gpio_app_interrrupt_handler, NULL);

          wiced_hal_gpio_configure_pin(WICED_GPIO_PIN_BUTTON_1,

                                       (GPIO_INPUT_ENABLE | GPIO_PULL_DOWN | GPIO_EN_INT_RISING_EDGE),

                                       GPIO_PIN_OUTPUT_LOW);

      does not result in a call to the hal_gpio_app_interrrupt_handler() ISR. I added a call to wiced_hal_gpio_get_pin_config() to get/send the pin status and it's value is 521 (0x209) which seems correct.

       

      The ISR for the WICED_SECONDS_PERIODIC_TIMER that's in the same snip.hal.gpio example also does not run.

       

      Why don't my ISR's run? Am I missing a global interrupt enable somewhere?

        • 1. Re: CYBT-423028-02 Interrupt Handlers Not Getting Called
          JoOr_4004241

          The problem turned out to be due to a mistake I made in installing the CYBT_423028_EVAL platform files that I downloaded from the Cypress KBA223637. I did it all correctly on the first system I was working on but when I moved to a new computer I missed replacing ...\20719-B1_Bluetooth\WICED\common\spar_setup.c. Once I got the correct spar_setup.c file and did a clean build of my project, it all worked.

           

          I did make the following changes to eliminate two build warnings:

           

          In ...\20719-B1_Bluetooth\platforms\CYBT_423028_EVAL\wiced_platform.h,  I added the following line at the end of the file:

              void wiced_platform_init(void);

           

          In ...\20719-B1_Bluetooth\WICED\common\spar_setup.c, I added the following line at the end of the #includes list near the top of the file:

              #include "wiced_platform.h"

           

          In ...\20719-B1_Bluetooth\WICED\common\spar_setup.c, I added the following line just before "#define micro_bcsIsNormalModeTransition()...:

              extern BOOL32 boot_isWarmboot(void);

          1 of 1 people found this helpful
          • 2. Re: CYBT-423028-02 Interrupt Handlers Not Getting Called
            MichaelF_56

            Thanks for sharing the resolution with the community JoOr_4004241