You are here

Debug and Programming, why is not working after programming? | Cypress Semiconductor

Debug and Programming, why is not working after programming?

Summary: 4 Replies, Latest post by e.pratt_1639216 on 26 Oct 2016 11:51 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
Andrea Bodini's picture
User
4 posts

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

user_1377889's picture
User
9583 posts

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

Andrea Bodini's picture
User
4 posts

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

user_1377889's picture
User
9583 posts

Debugging does not work with deep sleep mode.

 

Bob

e.pratt_1639216's picture
User
6 posts

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

Log in to post new comments.