4 Replies Latest reply on Oct 26, 2016 11:51 AM by e.pratt_1639216

    Debug and Programming, why is not working after programming?

    AndreaBodini

      Good morning everybody,

         

       

         

      I'm working with the PSOC 4 BLE Pioneer Board, and obviously Psoc creator 4.0.

         

       

         

      I'm writing a firmware with BLE and want to work with different power status of the device.

         

      I'm noticing that the device is working only when I press the debug button in psoc creator, when I press the program button it doesn't work anymore.

         

      The strange thing is that when I press the stop button in debug environment, the device continue its operations correctly.

         

      Sorry for the stupid question, but I have to test the power consumption without the debugger, which drains a lot of current.

         

      Thanks in advice,

         

      Andrea

        • 1. Re: Debug and Programming, why is not working after programming?
          user_1377889

          Welcome in the forum, Andrea.

             

          In Creator, Workspace explorer, design-wide resources, system: Set the debug select to GPIO which will disable the internal debugging hardware.

             

           

             

          Bob

          • 2. Re: Debug and Programming, why is not working after programming?
            AndreaBodini

            Thank you! It works right now.

               

            At the moment I'm encountering a new problem: why with the debug procedure the low power mode was working, and right now it stuck the device in a unclear status?

               

            I've just copied the low power implementation procedure from a tutorial on the cypress website.

               

            This is the code:

               
            if((CyBle_GetState() == CYBLE_STATE_ADVERTISING) || (CyBle_GetState() == CYBLE_STATE_CONNECTED))     {         /* Request BLE subsystem to enter into Deep-Sleep mode between connection and advertising intervals */         bleMode = CyBle_EnterLPM(CYBLE_BLESS_DEEPSLEEP);         /* Disable global interrupts */         interruptStatus = CyEnterCriticalSection();         /* When BLE subsystem has been put into Deep-Sleep mode */         if(bleMode == CYBLE_BLESS_DEEPSLEEP)         {             /* And it is still there or ECO is on */             if((CyBle_GetBleSsState() == CYBLE_BLESS_STATE_ECO_ON) || (CyBle_GetBleSsState() == CYBLE_BLESS_STATE_DEEPSLEEP))             {                 CySysPmDeepSleep();             }         }         else /* When BLE subsystem has been put into Sleep mode or is active */         {             /* And hardware doesn't finish Tx/Rx opeation - put the CPU into Sleep mode */             if(CyBle_GetBleSsState() != CYBLE_BLESS_STATE_EVENT_CLOSE)             {                 CySysPmSleep();             }         }         /* Enable global interrupt */         CyExitCriticalSection(interruptStatus);     }
               

             

               

            Thank you!!

               

            Andrea

            • 3. Re: Debug and Programming, why is not working after programming?
              user_1377889

              Debugging does not work with deep sleep mode.

                 

               

                 

              Bob

              • 4. Re: Debug and Programming, why is not working after programming?
                e.pratt_1639216

                I believe Bob's statement also includes the "Hibernate", and "Stop" states as well as the "Deep Sleep".