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

STM32WL fixed current consumption for mode RBI_CONF_RFO_HP #15017

Merged
merged 1 commit into from
Aug 30, 2021

Conversation

hallard
Copy link
Contributor

@hallard hallard commented Aug 20, 2021

Summary of changes

STM32WL, fixed current consumption when using mode RBI_CONF_RFO_HP

Added optimal settings when using mode RBI_CONF_RFO_HP according ST application note an5457 section 5.1.2

image

See detailed post issue here

Impact of changes

Added optimal settings when using mode RBI_CONF_RFO_HP(only RFO High)

Migration actions required

Documentation


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)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@MarceloSalazar @jeromecoutant @0xc0170


@hallard hallard changed the title Stm32 wl hp optimal STM32WL fixed current consumption for mode RBI_CONF_RFO_HP Aug 20, 2021
@jeromecoutant
Copy link
Collaborator

@ludoch-stm Please comment
Thx

@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Aug 20, 2021
@ciarmcom
Copy link
Member

@hallard, thank you for your changes.
@MarceloSalazar @jeromecoutant @ARMmbed/mbed-os-maintainers please review.

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

please squash these into one (its simple fix).

@hallard
Copy link
Contributor Author

hallard commented Aug 25, 2021

please squash these into one (its simple fix).

not easy (at least for me, last time I tried it wen't bad) once all files commited in existing PR (this one) but you can merge with squash option, easier for everyone if you don't mind

fixed wrong help values name

added detailled comments

fix style-check

fix style-check
@0xc0170
Copy link
Contributor

0xc0170 commented Aug 25, 2021

OK, we will squash

@hallard
Copy link
Contributor Author

hallard commented Aug 25, 2021

OK, we will squash

I tried in the meantime with magic command line, looks like it worked :-)

@mergify mergify bot dismissed 0xc0170’s stale review August 25, 2021 08:26

Pull request has been modified.

@hallard hallard requested a review from 0xc0170 August 25, 2021 08:47
@hallard
Copy link
Contributor Author

hallard commented Aug 27, 2021

Hi there, just asking, any chance to get this PR merged before 6.14 release?

Copy link
Collaborator

@jeromecoutant jeromecoutant left a comment

Choose a reason for hiding this comment

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

Approved by ST Lora team

@mergify mergify bot added needs: CI and removed needs: work labels Aug 30, 2021
@0xc0170
Copy link
Contributor

0xc0170 commented Aug 30, 2021

CI started

@mbed-ci
Copy link

mbed-ci commented Aug 30, 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-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-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_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

@0xc0170 0xc0170 merged commit 539d1c7 into ARMmbed:master Aug 30, 2021
@mergify mergify bot removed the ready for merge label Aug 30, 2021
@hallard
Copy link
Contributor Author

hallard commented Jul 2, 2022

@jeromecoutant, @0xc0170
looking at this post that relies on this PR, looks like this one is a tradeoff between consumption and range, if this PR fix consumption it has impact on range (at high power) so there is not and ideal fix because changing power has impact due to matching circuit that has been done for 20db not 14. So I would like to have an option not using this fix, may be with a
#define or so.

So I'm asking you guys what the best option and if you approve a change like that (so changing nothing if this define not defined by default)?

#ifndef RBI_CONF_RFO_HP_NO_POWER_FIX
        // We are in rfo_hp ONLY but it's not optimal settings for other than +21dBm or +22dBm
        if (board_rf_switch_config == RBI_CONF_RFO_HP) {
            // so we need to handle settings sot rfo_lp equilavent that we don't have enabled
            // See Section 5.1.2 of Application Note 
            // https://www.st.com/resource/en/application_note/an5457-rf-matching-network-design-guide-for-stm32wl-series-stmicroelectronics.pdf
            if (power > 20) {
                set_pa_config(0x04, 0x07, 0x00, 0x01);
            } else if (power > 17) {
                set_pa_config(0x03, 0x05, 0x00, 0x01);
            } else if (power > 14) {
                set_pa_config(0x02, 0x03, 0x00, 0x01);
            } else {
                set_pa_config(0x02, 0x02, 0x00, 0x01);
            }
        // In this case we have 
        } else {
            set_pa_config(0x04, 0x07, 0x00, 0x01);
        }
#else
        // no power patch
        set_pa_config(0x04, 0x07, 0x00, 0x01);
#endif

@jeromecoutant
Copy link
Collaborator

Hi
I am really not a lora expert, so I will trust you in that domain :-)
Another idea: add a new value for board_rf_switch_config ?
#define RBI_CONF_RFO_HP_NO_POWER 3

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