zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.98k stars 6.69k forks source link

Power Electronics Roadmap #38629

Open martinjaeger opened 3 years ago

martinjaeger commented 3 years ago

This issue is used to track the status of features related to power electronics in Zephyr.

See also related Mini-Conference recording from Zephyr Developer Summit 2021.

Advanced PWM / timers

Typical features

Overview of MCU series

MCU Series Motor Timer High-resolution Timer
ST STM32 TIM1/TIM8 - Advanced Timer HRTIM - High-Resolution Timer
Microchip SAM TCC - Timer/Counter for Control Applications -
NXP Kinetis FlexTimer eFlexPWM
TI C2000 * ePWM HRPWM
ESP32 MCPWM - Motor Control PWM -

*) currently not supported by Zephyr

ToDos (mainly for STM32 HRTIM)

Real-Time Stream and Sensor API (RTIO)

Offloading of ADC and automated processing of ADC readings in the background.

Related PRs

Hardware triggers

Hardware triggers to connect timers, ADC, DAC and comparators.

Related PRs

Comparator API

Mainly relevant if it can be coupled with DAC and timers for fast overcurrent protection and DC/DC control loops.

henrikbrixandersen commented 3 years ago

I have implemented support for the NXP Kinetis Analog Comparator (ACMP) using the Zephyr sensors API: https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/sensor/mcux_acmp/mcux_acmp.c

Perhaps we can generalize the sensor API extensions used for the ACMP and avoid a comparator specific API?

hongshui3000 commented 2 years ago

Is this roadmap still a work in progress?I feel like I've been stuck for a lot of time.

seyednasermoravej commented 9 months ago

Hello everyone,

I’m working on implementing a converter that consists of a few cascaded devices. Each of these devices requires a high-resolution timer, and it’s essential that these timers are synchronized with each other. The system-on-chip (SoC) I’m using is the STM32G474RE, which includes a high-resolution timer. However, I couldn’t find any information about this timer in the .dtsi file. My question is whether it’s possible to utilize this timer and achieve synchronization among the timers with current progress? In CubeMX, the input synchronization pin is referred to as HRTIM1_SCIN, and the output synchronization is labeled as HRTIM1_SCOUT.