cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Bluetooth

JoOr_4004241
New Contributor II

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?

0 Likes
1 Solution
JoOr_4004241
New Contributor II

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);

View solution in original post

2 Replies
JoOr_4004241
New Contributor II

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);

View solution in original post

MichaelF_56
Moderator
Moderator

Thanks for sharing the resolution with the community joe.orzechowski_4004241

0 Likes