Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
AD9523 clock generator interface

AD9523 clock generator interface. More...

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 clock generator interface.

Macro Definition Documentation

◆ AD9523_CLK_OUT

#define AD9523_CLK_OUT ( n)

#include <zephyr/drivers/clock_control/ad9523.h>

Value:
void * clock_control_subsys_t
Opaque handle identifying a clock controller subsystem.
Definition clock_control.h:65
__UINTPTR_TYPE__ uintptr_t
Definition stdint.h:105

Build a clock_control_subsys_t handle for output n (0..13).

The handle is the output number biased by one: output 0 is a real output, and an unbiased handle of 0 would be indistinguishable from CLOCK_CONTROL_SUBSYS_ALL (which is NULL) in the subsystem API.

◆ AD9523_NUM_CLK_OUT

#define AD9523_NUM_CLK_OUT   14

#include <zephyr/drivers/clock_control/ad9523.h>

Number of clock outputs on an AD9523.

Function Documentation

◆ ad9523_get_status()

int ad9523_get_status ( const struct device * dev,
struct ad9523_status * status )

#include <zephyr/drivers/clock_control/ad9523.h>

Read back VCXO/PLL1/PLL2 lock detail.

clock_control_get_status() collapses this to a single enum clock_control_status; this returns the underlying detail, which is what a JESD204 bring-up failure needs in order to be diagnosable.

Performs SPI reads, so it must be called from thread context.

Parameters
devAD9523 device.
statusDestination, populated on success only.
Return values
0Success.
-EINVALNot an AD9523 device, or status is NULL.
-EWOULDBLOCKCalled from an ISR.
-errnoOther negative errno from the SPI transfer.

◆ ad9523_sync()

int ad9523_sync ( const struct device * dev)

#include <zephyr/drivers/clock_control/ad9523.h>

Issue a chip-level SYNC.

Toggles SYNC_MAN_CTRL (status-signals register 0x232 bit 16) with an io_update on each edge, re-aligning every output divider to its programmed phase.

Performs SPI transfers, so it must be called from thread context.

Parameters
devAD9523 device.
Return values
0Success.
-EINVALNot an AD9523 device.
-EWOULDBLOCKCalled from an ISR.
-errnoOther negative errno from the SPI transfer.