Cy_BLE_EcoConfigure fails with CY_BLE_ECO_HARDWARE_ERROR

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

cross mob
NiBu_4687336
Level 5
Level 5
5 solutions authored 50 replies posted 25 replies posted

I'm using a CY8CPROTO-063-BLE board. When I try to initialize the BLE ECO clock, Cy_BLE_EcoConfigure() returns CY_BLE_ECO_HARDWARE_ERROR. The proximate cause is a time-out waiting for the  BLE_BLESS_MT_STATUS.BLESS_STATE bit to be set, at line 409 in cy_ble_clk.c.

I have previously had BLE working in both Central Device and Peripheral roles, on two different copies of the board, and both boards now display the same behavior, so it's unlikely actually to be a hardware error. It's almost certainly a configuration problem, but I have no idea where to start looking.

    /* Wait for BLESS in ACTIVE state */
    while(((BLE_BLESS_MT_STATUS & BLE_BLESS_MT_STATUS_BLESS_STATE_Msk) == 0U) && (timeout > 0U))
    {
        timeout--;
        Cy_SysLib_DelayUs(CY_BLE_DELAY_TIME);
    }
    if(timeout == 0U)
    {
        status = CY_BLE_ECO_HARDWARE_ERROR;
    }

Any suggestions would be appreciated.

Thanks,

-Nick

0 Likes
11 Replies
NiBu_4687336
Level 5
Level 5
5 solutions authored 50 replies posted 25 replies posted

Poking to keep post alive.

0 Likes
NiBu_4687336
Level 5
Level 5
5 solutions authored 50 replies posted 25 replies posted

Do Cypress engineers still monitor this forum, or was that part of the change to the new platform?

0 Likes
NiBu_4687336
Level 5
Level 5
5 solutions authored 50 replies posted 25 replies posted

Well, this is entertaining. The Cypress forum-bot has detected that my question has received replies, and helpfully suggests that I mark one as correct. I'll leave this as this week's poke.

0 Likes
SaraLeslie
Community Manager
Community Manager
Community Manager
250 sign-ins 100 sign-ins 50 likes received

Hello, sorry you haven't received a response. I have escalated this to the Modus Toolbox team. 

Community Manager
0 Likes
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

Could you please let me know when you are calling this Cy_BLE_EcoConfigure() API in the firmware ? Do not call this API if the BLE is executed with LPM. There is a risk that when the Cy_BLE_EcoConfigure() function is called on one core, the BLE is in Deep Sleep mode on the other core. It will cause a fault hard exception.
If possible, please share your project so that we can check at our end.

Thanks,
P Yugandhar.

NiBu_4687336
Level 5
Level 5
5 solutions authored 50 replies posted 25 replies posted

Hi @Yugandhar.

Thanks for the reply. I'm not calling  Cy_BLE_EcoConfigure() directly. It's called from within cybsp_init(). The call stack is

cybsp_init() -> init_cycfg_all() -> init_cycfg_system() -> Cy_SysClk_AltHfinit() -> Cy_BLE_EcoConfigure().

cybsp_init() is executed by the CM4. The CM0 is in Deep Sleep mode when this happens, but it is at the very beginning of the initialization phase, and no library code has been executed. Besides, all BLE code in my project runs on the CM4 processor.

It would be difficult to provide a complete project, but could be done if there's no other way to debug this. 

Thanks again,

-Nick

0 Likes
NiBu_4687336
Level 5
Level 5
5 solutions authored 50 replies posted 25 replies posted

(sigh) - Back to the weekly poke to prevent the thread being ignored to death.

0 Likes

Hello,

If possible, could you please share your design.modus and BLE config files of your project ?
Please refer to the "BLE_Find Me" code example in the MTB and check if you are seeing any issues. 

Thanks,
P Yugandhar.

lock attach
Attachments are accessible only for community members.
NiBu_4687336
Level 5
Level 5
5 solutions authored 50 replies posted 25 replies posted

Hi @Yugandhar.

Thanks. I've attached my design.modus and design.cybt files.

The BLE examples work normally, which only reinforces the idea that I've just misconfigured something.

-Nick

0 Likes
NiBu_4687336
Level 5
Level 5
5 solutions authored 50 replies posted 25 replies posted

Poking to keep the thread alive while waiting for a response.

0 Likes

Hello,

 

I have created a Technical support case, please share your complete project in the case so that we can check at our end.

 

Thanks,

P Yugandhar.

0 Likes