power-performance
Power management and performance optimization for Zephyr RTOS. Covers system power states (Idle, Suspend, Off), device-level power management, residency hooks, and code/data relocation for speed efficiency. Trigger when optimizing battery life, reducing latency, or managing memory constraints.
适合你,如果正在为 Zephyr 嵌入式设备平衡功耗与性能
/ 通过 npx 安装 校验哈希
npx oh-my-skill add beriberikix/zephyr-agent-skills/power-performance/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- beriberikix/zephyr-agent-skills/power-performance/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify beriberikix/zephyr-agent-skills/power-performance安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
58GitHub stars
~553最小装载
~1.9K含声明引用
~2K文本包总量
索引托管
怎么用
商店整理自技能原文 · 版本 ed63cdf · 表述以原文为准它做什么
Claude会提供Zephyr RTOS电源管理(空闲、挂起、关闭)和性能优化建议,包括设备级功耗控制、代码重定位、线程分析等,帮助平衡功耗与性能。
什么时候触发
当你询问优化电池寿命、降低延迟或管理内存约束时触发,或涉及Zephyr电源管理与性能调优的场景。
装好后可以这样说
Claude会介绍系统电源管理和外设策略
Claude会说明代码重定位方法
技能原文 SKILL.md
Zephyr Power & Performance
Maximize the efficiency of your embedded system by balancing power consumption and computational performance.
Core Workflows
1. Power Management (PM)
Implement system-level and peripheral-specific power saving strategies.
- Reference: [power_management.md](references/power_management.md)
- Key Tools:
pm_device_action_run,pm_state_set, Residency hooks.
2. Performance Tuning
Optimize critical code paths and monitor system resources.
- Reference: [performance_tuning.md](references/performance_tuning.md)
- Key Tools:
CONFIG_THREAD_ANALYZER, Linker Map, Code relocation.
3. Memory Optimization
Relocate code and data to utilize the fastest memory available.
- Reference: [performance_tuning.md](references/performance_tuning.md#code--data-relocation)
- Key Tools:
__ramfunc, Relocation scripts.
Quick Start (Device Suspend)
#include <zephyr/pm/device.h>
const struct device *spi0 = DEVICE_DT_GET(DT_NODELABEL(spi0));
void sleep_spi(void) {
pm_device_action_run(spi0, PM_DEVICE_ACTION_SUSPEND);
}
Professional Patterns (Optimization)
- Aggressive Suspend: Transition peripherals to low-power states as soon as their transaction is complete.
- ITCM/DTCM: Use Tightly Coupled Memory for time-critical control loops to avoid Flash latency.
- Runtime Monitoring: Always enable the thread analyzer during development to find the "RAM floor" for your application.
- Coordinated Sleep: To coordinate sleep across modules, see [kernel-services](../kernel-services/SKILL.md) for Zbus-based event-driven power management.
Automation Tools
- [power_budget_estimator.py](scripts/power_budget_estimator.py): Estimate average current and battery life from duty-cycle state data.
Examples & Templates
- [power_budget_template.csv](assets/power_budget_template.csv): Starter power-state budget sheet for battery-life estimation.
Validation Checklist
- [ ] Target peripherals enter and exit suspend/resume states without functional regressions.
- [ ] Measured idle and active power align with expected optimization deltas.
- [ ] Thread analyzer and map data confirm stack/RAM budgets are within limits.
- [ ] Relocated time-critical functions execute from intended memory region.
Resources
- [References](references/):
power_management.md: System states, device PM, and hooks.performance_tuning.md: Optimization strategies and relocation.- [Scripts](scripts/):
power_budget_estimator.py: Duty-cycle based battery-life estimator.- [Assets](assets/):
power_budget_template.csv: Initial state/current budget template.
按 Apache-2.0 许可原样转载,未经改动 · 在 GitHub 查看 →
评论
登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。
…