Bootloadable not waking on GPIO interrupt | Cypress Semiconductor
Bootloadable not waking on GPIO interrupt
I am having a problem whereby my application code is running really slowly because the device is sleeping during the disconnect interval and not waking when my GPIO pin is active.
I have raised a case for this but not heard back for 3 days.
I created an example to demonstrate.
The attached is the HID keyboard bootloader/bootloadable project with the following mods:
I moved a few pin assignments to pins which are accessible on the BLE pioneer board.
The original "enter bootloader" pushbutton which has a wakeup interrupt configured I have re-assigned as a plain GPIO input.
The green LED I have re-assigned as a "sleeping" LED.
The "bootloading" LED I have moved to a plain GPIO and activate it once per pass of the main loop. This needs to be connected to the interrupt pin, so P2 needs to be linked to P2 on the board.
When the bootloadable is run, the green LED glows brightly indicating the code is spending most of its time asleep. If the link from P2 to P2 is connected/disconnected there is no difference. A scope confirms P2 is pulsing and this should be causing a wake interrupt every pass of the loop.
In the main loop, if the 2 sleep API calls are commented out, the green LED glows dimly, indicating the code is no longer spending time asleep. But of couse removing sleep completely is not an option.
I am pretty sure this issue is specific to the bootloader/bootloadable setup. I did a quick check using a non-bootloadable project and it seemed to work properly.