Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
ad9523.h File Reference

AD9523(-1) clock generator – clock_control extension API. More...

#include <stdbool.h>
#include <stdint.h>
#include <zephyr/device.h>
#include <zephyr/drivers/clock_control.h>

Go to the source code of this file.

Data Structures

struct  ad9523_status
 PLL, VCXO and VCO status, as read back from the chip. More...

Macros

#define AD9523_NUM_CLK_OUT   14
 Number of clock outputs on an AD9523.
#define AD9523_CLK_OUT(n)
 Build a clock_control_subsys_t handle for output n (0..13).

Functions

int ad9523_get_status (const struct device *dev, struct ad9523_status *status)
 Read back VCXO/PLL1/PLL2 lock detail.
int ad9523_sync (const struct device *dev)
 Issue a chip-level SYNC.

Detailed Description

AD9523(-1) clock generator – clock_control extension API.

The AD9523-1 is driven through the standard Zephyr clock_control API:

clock_control_get_rate(dev, AD9523_CLK_OUT(13), &hz) clock_control_get_status(dev, CLOCK_CONTROL_SUBSYS_ALL) clock_control_on(dev, AD9523_CLK_OUT(1)) clock_control_off(dev, AD9523_CLK_OUT(1))

set_rate, async_on and configure are deliberately not implemented – the public wrappers return -ENOSYS for them. Every output rate comes from devicetree and retuning a divider under a live JESD204 link would break the link.

This header adds the two things the standard API cannot express: a chip-level SYNC and PLL-level lock status detail.