5 Replies Latest reply on Feb 8, 2018 3:04 AM by ancac_1978476

    Timer Interrupt works in DeBug but not "program"...new file attached


      Using EZ-BLE module (CYBLE-214009-00) , PSoC 4 with the pioneer board I have two pushbutton switches which I want my program to respond to when either has been pressed and held for 3-4 seconds.  The response (for test purposes) should be that SW1 will toggle an output driving an LED and SW2 will do the same to another LED.  If I program this code to the PSoC 4 without code for BLE operation installed, it works fine both when doing Debug and non-debug (program) operation.  If I install code to allow BLE bonding when an iPhone or iPad is very close to the EZ-BLE module the switches still work properly when in Debug mode but not when "programmed" (non-debug mode).


      Operation should be:  when a PB is pressed and held a timer is started (set for a timeout of 3 seconds).  If the button is held for more than the timeout period the timer initiates an interrupt at terminal count.  The interrupt's ISR, based on a flag which indicates which button has been pressed, then toggles the pin driving the appropriate LED.  Pressing and releasing the button before the timeout period is over simply stops the timer and nothing else happens.


      In the situation when it's not operating properly, the first press of a button whether held or not does nothing to the LEDs and the ISR is not called.  However, all subsequent presses cause immediate toggling of the LEDs without the required hold time.  This despite the fact that nothing relating to BLE functions, such as bonding, has been done, except whatever the code itself does, no action on my part has been taken.


      I'd sure be grateful for any advice anyone could give me on this.  The (new) bundle is attached.