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

ctxlink/wifi: fix the speed issues with the Wi-Fi interface #2007

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

sidprice
Copy link
Contributor

The reading of the ADC to acquire the target and battery
voltages was being done in a blocking manner and at
a place in the code that blocked the timely servicing
of the Wi-Fi channel.

In this updated code the ADC is read in the Timer service of the Wi-Fi Server.
There are two channels and each channel conversion is started on one timer service and read on the next timer service. Giving four phases of operation.

Also, the ADC reading code is only run every 100ms.

Your checklist for this pull request

Closing issues

None.

@dragonmux dragonmux added Bug Confirmed bug Foreign Host Board Non Native hardware to runing Black Magic firmware on labels Nov 28, 2024
@dragonmux dragonmux added this to the v2.0 release milestone Nov 28, 2024
Copy link
Member

@dragonmux dragonmux left a comment

Choose a reason for hiding this comment

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

This definitely gets most of the way there and we like what we see! There are only two major comments here which are about using the GCC-specific compiler intrinsics rather than the stdlib functions, and as a result a couple of parameters winding up backwards which might compile with the builtins, but which shouldn't as it does alter the meaning of the code. Using the stdlib functions prevents this due to how they're typed.

src/platforms/ctxlink/platform.c Outdated Show resolved Hide resolved
src/platforms/ctxlink/platform.c Outdated Show resolved Hide resolved
src/platforms/ctxlink/platform.c Outdated Show resolved Hide resolved
The reading of the ADC to acquire the target and battery
voltages was being done in a blocking manner and at
a place in the code that blocked the timely servicing
of the Wi-Fi channel.
Copy link
Member

@dragonmux dragonmux left a comment

Choose a reason for hiding this comment

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

This all LGTM, merging. Thank you for the contribution and congrats on the speed doubling (if not slightly more) of the WiFi interface on your ctxLink!

@dragonmux dragonmux merged commit b0eb8d0 into blackmagic-debug:main Nov 28, 2024
36 checks passed
@sidprice sidprice deleted the ctxlink_wifi_speed branch November 28, 2024 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed bug Foreign Host Board Non Native hardware to runing Black Magic firmware on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants