-
Notifications
You must be signed in to change notification settings - Fork 7.8k
low cost power shield solution #95056
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
base: main
Are you sure you want to change the base?
Conversation
hakehuang
commented
Aug 27, 2025
- Create adc_power_shield sample for any board with adc can be used for power measurement.
- Add general_adc_platform power shiled, which can be used for power measurement with the sample application.
- the power data is stored in the power_shield folder for further analysis
log for mimxrt595_evk board
|
enable power shield testing on mimxrt595_evk ``` scripts/twister --device-testing --device-serial /dev/ttyACM0 -T samples/boards/nxp/mimxrt595_evk/system_off -X pm_probe:/dev/ttyACM1,115200 ``` an power_shield folder will be created in the build path whith measured voltage/current/power Signed-off-by: Hake Huang <[email protected]>
59e3ca2
to
8f0f3f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take a look at #94585, and only keep 1 platform per vendor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @JarmouniA PR #94585 looks good, I will update according after your PR merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to wait for it to be merged, just apply the same filtering and only keep overlay/conf of 1 platform per vendor in the new sample.
|
||
config SEQUENCE_32BITS_REGISTERS | ||
bool "ADC data sequences are on 32bits" | ||
default n |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default n |
zephyr,input-positive = <6>; | ||
zephyr,vref-mv = <3300>; | ||
}; | ||
channel@7 { // Connector A0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline line 35
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; | ||
zephyr,resolution = <12>; | ||
}; | ||
channel@3 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline between nodes
pinctrl-0 = <&adc0_default>; | ||
pinctrl-names = "default"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move above child node
samples/drivers/adc/adc_power_shield/boards/s32z2xxdc2_s32z270_rtu0.overlay
Show resolved
Hide resolved
8f0f3f4
to
c19dcd6
Compare
a113789
to
cd51acf
Compare
add power_shield sample for general_adc_platform power shiled, to record power/voltage/current Signed-off-by: Hake Huang <[email protected]>
1. general power shield work with the adc_power_shield sample 2. config samples to config probe 3. add readme Signed-off-by: Hake Huang <[email protected]>
cd51acf
to
b5f1df0
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is a really great addition
# Additional development tools | ||
ipython>=8.0.0 | ||
jupyter>=1.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these actually used here?
# Set UTF-8 encoding for stdout/stderr | ||
os.environ['PYTHONIOENCODING'] = 'utf-8' | ||
|
||
# For Python 3.7+, you can also reconfigure stdout/stderr | ||
if hasattr(sys.stdout, 'reconfigure'): | ||
sys.stdout.reconfigure(encoding='utf-8') | ||
sys.stderr.reconfigure(encoding='utf-8') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this under def main
or __name__ == "__main__"
so that the module is cleanly importable?