Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CYW43XXX Cordio HCI driver: update BT power up sequences to remove redundant delay (500ms) during HCIDrive initialization #14988

Merged
merged 2 commits into from
Aug 17, 2021

Conversation

npal-cy
Copy link

@npal-cy npal-cy commented Aug 9, 2021

Summary of changes

Update of BT power up sequences to remove redundant delay (500ms) in BT_POWER operation during HCIDrive initialization.

Current BT_POWER sequence:

  1. BT_POWER=0 ( from CyH4TransportDriver::initialize)
  2. delay 1ms ( from CyH4TransportDriver::initialize)
  3. BT_POWER=1 ( from CyH4TransportDriver::initialize)
  4. delay 500ms (from HCIDriver::do_initialize)
  5. BT_POWER=1 (from HCIDriver::do_initialize)
  6. delay 500ms (from HCIDriver::do_initialize).

Suggest to update:

  1. remove 4) and 5)
  2. keep all BT_POWER operations in one place. The best logic place is CyH4TransportDriver::initialize.

So finally the BT_POWER sequences should looks like:

  1. BT_POWER=0 ( from CyH4TransportDriver::initialize)
  2. delay 1ms ( from CyH4TransportDriver::initialize)
  3. BT_POWER=1 ( from CyH4TransportDriver::initialize)
  4. delay 500ms ( from CyH4TransportDriver::initialize)

Depends on: PR#14982

Impact of changes

Migration actions required

Documentation

None


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[X] Tests / results supplied as part of this PR

Reviewers

@ARMmbed/team-cypress

CY8CKIT_062_WIFI_BT-ble-cordio-hci.pdf
CY8CKIT_062S2_43012-full-test.pdf
CY8CPROTO_062_4343W-ble-cordio-hci.pdf
CYW9P62S1_43012EVB_01-ble-cordio-hci.pdf
CYW9P62S1_43438EVB_01-ble-cordio-hci.pdf

@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Aug 9, 2021
@ciarmcom ciarmcom requested a review from a team August 9, 2021 21:00
@ciarmcom
Copy link
Member

ciarmcom commented Aug 9, 2021

@npal-cy, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@@ -103,9 +103,6 @@ class HCIDriver : public CordioHCIDriver {
{
//Prevent PSoC6 to enter deep-sleep till BT initialization is complete
sleep_manager_lock_deep_sleep();
rtos::ThisThread::sleep_for(500ms);
bt_power = 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to keep bt_power member variable ? It doesn't seems to be used anymore (except for initialization).
I also noticed that it is initialized differently in the transport (PullNone) from the HCI (PullUp) driver.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @pan,
I updated code according to your comment. Additionally cleaned some indentations (replaced tab to spaces)

Regards,
Nazar

nazar.palamar added 2 commits August 13, 2021 17:25
…BT_POWER operation during HCIDrive initialization.

Current BT_POWER sequence:
1. BT_POWER=0  ( from CyH4TransportDriver::initialize)
2. delay 1ms   ( from CyH4TransportDriver::initialize)
3. BT_POWER=1  ( from CyH4TransportDriver::initialize)
4. delay 500ms (from HCIDriver::do_initialize)
5. BT_POWER=1  (from HCIDriver::do_initialize)
6. delay 500ms (from HCIDriver::do_initialize)

updates:
1. remove 4) and 5)
2. keep all BT_POWER operations in one place. The best logic place is CyH4TransportDriver::initialize.

So finally the BT_POWER sequences should looks like:
1. BT_POWER=0  ( from CyH4TransportDriver::initialize)
2. delay 1ms   ( from CyH4TransportDriver::initialize)
3. BT_POWER=1  ( from CyH4TransportDriver::initialize)
4. delay 500ms ( from CyH4TransportDriver::initialize)
…ver class; 2. set PullUp for bt_power in CyH4TransportDriver; 3. cleanup code: replace tabs to 4 spaces
@npal-cy npal-cy marked this pull request as ready for review August 13, 2021 23:10
@mergify mergify bot added needs: CI and removed needs: review labels Aug 16, 2021
@0xc0170
Copy link
Contributor

0xc0170 commented Aug 17, 2021

CI started

@mbed-ci
Copy link

mbed-ci commented Aug 17, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

@0xc0170 0xc0170 merged commit 09eee58 into ARMmbed:master Aug 17, 2021
@mergify mergify bot removed the ready for merge label Aug 17, 2021
@mbedmain mbedmain added release-version: 6.14.0 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants