Debug and Programming, why is not working after programming?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
anboc_1467431
Level 3
Level 3
First like received

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

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

View solution in original post

0 Likes
4 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes

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

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Debugging does not work with deep sleep mode.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

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

0 Likes