BLE error in debug - CY8CPROTO-062-4343W

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

cross mob
RuHe_1008296
Level 3
Level 3
5 replies posted 5 questions asked First reply posted

When using MBED with the  CY8CPROTO-062-4343W we found that when debugger is attached (no breakpoints set) the BLE does not call the ble init callback.

everything seems to work fine without the debugger attached.

Bluetooth will never start advertising when a debugger is connected and execution is run via the debugger. If the debugger session is stopped and the target is reset, the bluetooth will start advertising.  This weird behavior can be seen in the “Mbed-os-example-wifi-provisioning-via-bl” example project.

Everything seems to work fine up to MBED 5.14.1. But when using anything newer the BLE does not work while debugging.

Wierd debugging Behavior verified on the following mbed-os tags:

  • 5.15.1
  • 5.15.3
  • 5.14.2

Everything seems to work correctly on

  • 5.13.1
  • 5.14.0
  • 5.14.1

This can be reproduced taking the Mbed-os-example-wifi-provisioning-via-bl” example project and upgrading mbed from 5.13.1 to 5.14.2 or higher.

We would like to use the newest released version of MBED but, without debugging functionality it is unfeasible.

0 Likes
1 Solution

Deep sleep was enabled by default from mbed-os 5.14.2 onwards. Can you try disabling deep sleep and enter debug?

You can disable deep sleep by calling sleep_manager_lock_deep_sleep() (for a quick build) or remove MBED_TICKLESS in MCU_PSOC6_M4 > macros_add of targets.json (longer build time since it rebuilds).

Making this change helps you debug in OpenOCD. We are looking into the root cause on PyOCD still. I will post the developments here.

Regards,

Dheeraj

View solution in original post

5 Replies
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Can you please let me know which IDE (Mbed Studio, Visual Studio Code etc..) you are using? Not sure if this is IDE specific, but want to look at that aspect too. I will run my tests on Mbed Studio and see if I can reproduce this until then.


Regards,

Dheeraj

0 Likes

We are using  ModusToolbox 2.1. We have used the MBED CLI export feature and imported as makefile project.

As described in https://www.cypress.com/file/504371/download

0 Likes

Yes, you are right. I'm able to reproduce this at my end. I tried exporting the project in both debug and release modes but the issue persists. I will be passing this query to the internal software team for evaluation.

Thank you for your interest in Cypress Products.

Regards,

Dheeraj

0 Likes

Thanks, has there been any updates on the issue?

0 Likes

Deep sleep was enabled by default from mbed-os 5.14.2 onwards. Can you try disabling deep sleep and enter debug?

You can disable deep sleep by calling sleep_manager_lock_deep_sleep() (for a quick build) or remove MBED_TICKLESS in MCU_PSOC6_M4 > macros_add of targets.json (longer build time since it rebuilds).

Making this change helps you debug in OpenOCD. We are looking into the root cause on PyOCD still. I will post the developments here.

Regards,

Dheeraj