You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to Zephyr RTOS and trying to follow the best practices for driver development. My goal is to write a driver for the Analog Devices HMC7044, which I'll be using as a clock generator and distributor in my embedded system, controlled via SPI.
My previous experience is with the Zephyr Sensor subsystem, and I understand its API. Since the HMC7044 is just an SPI device, I know I could technically write a driver for it using the sensor API by creating custom attributes. However, this feels semantically incorrect, as the HMC7044 is not a sensor; its primary role is to generate and control clock signals.
I've looked at the clock_control subsystem, which seems like the correct functional fit. However, many of the existing clock_control drivers appear to be for a microcontroller's internal clock tree (like for STM32, NXP, etc.), not for external ICs.
My question is: Is the clock_control subsystem the correct and intended place for a driver for an external, SPI-controlled clock generator IC like the HMC7044? Or is there another, more appropriate subsystem I should be using?
Any guidance or examples of similar drivers would be greatly appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I'm new to Zephyr RTOS and trying to follow the best practices for driver development. My goal is to write a driver for the Analog Devices HMC7044, which I'll be using as a clock generator and distributor in my embedded system, controlled via SPI.
My previous experience is with the Zephyr Sensor subsystem, and I understand its API. Since the HMC7044 is just an SPI device, I know I could technically write a driver for it using the sensor API by creating custom attributes. However, this feels semantically incorrect, as the HMC7044 is not a sensor; its primary role is to generate and control clock signals.
I've looked at the clock_control subsystem, which seems like the correct functional fit. However, many of the existing clock_control drivers appear to be for a microcontroller's internal clock tree (like for STM32, NXP, etc.), not for external ICs.
My question is: Is the clock_control subsystem the correct and intended place for a driver for an external, SPI-controlled clock generator IC like the HMC7044? Or is there another, more appropriate subsystem I should be using?
Any guidance or examples of similar drivers would be greatly appreciated.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions