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

BLE_FreeRTOS tickless connection stability #1248

Open
sullivanmj opened this issue Nov 1, 2024 · 6 comments
Open

BLE_FreeRTOS tickless connection stability #1248

sullivanmj opened this issue Nov 1, 2024 · 6 comments

Comments

@sullivanmj
Copy link

sullivanmj commented Nov 1, 2024

I am attempting to run the BLE_FreeRTOS example for MAX32666. When I do not have tickless configured, I am able to see the DATS peripheral's advertisements and connect to it from a smartphone BLE explorer app.

Once I configure tickless and run the example, I notice the following:

  1. I see that the power consumption has dropped to a super low level - this is great, and exactly what I was hoping to see.
  2. I can see advertisements, but the signal strength has dropped by about 55 dBm (on a MAX32666FTHR from about -35 to -90, and on a MAX32666EVKIT with a known good Bluetooth antenna connect to J1, it falls from about -45 to -100)
  3. When I attempt to connect with the same smartphone BLE explorer app, the connection cannot be established.

For what it is worth, I am using the most recently released version of MaximSDK for this test.

@EricB-ADI
Copy link
Contributor

I am investigating this now. It seems to be an issue with the interaction of the physical layer and sleep.

@EricB-ADI
Copy link
Contributor

EricB-ADI commented Nov 4, 2024

Ok, int freertos_permit_tickless(void) does not check whether or not the radio is active. So, the part wakes up starts sending, but before it finishes the scheduler puts it back to sleep. The MAX32665/MAX32666 has no implementation to check if the radio is enabled. I have created the implementation and need to go through the proper steps to add it and verify the sleep is still working.

@EricB-ADI
Copy link
Contributor

The issue has been resolved

@sullivanmj
Copy link
Author

@EricB-ADI Thanks for the work on this one. I confirmed that I am now able to connect with a phone with the updated libphy.a. However the connection is dropped after about 30 seconds. When I do not use tickless, the phone is able to stay connected indefinitely. Any thoughts on what to do here?

@EricB-ADI
Copy link
Contributor

I am not too sure; I will need to do some tests. What device are you connecting to it with? IOS and Android behave differently, and IOS is not very lenient. The normal cause is sleeping too long, which may put the radio in an in between state of powering on. I am aware of one possible, solution in the PHY, but I will need to test, and if that doesn't work, I need to reach out to our RF team to help with characterization.

@EricB-ADI EricB-ADI reopened this Nov 12, 2024
@EricB-ADI EricB-ADI changed the title BLE_FreeRTOS example does not work in tickless mode on MAX32666 BLE_FreeRTOS tickless connection stability Nov 12, 2024
@sullivanmj
Copy link
Author

@EricB-ADI Thanks for following up. I'm connecting to a Pixel 3 XL via the LightBlue app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants