AnsweredAssumed Answered

Cannot read write register of DDS core

Question asked by vnucot on Oct 1, 2015
Latest reply on Oct 5, 2015 by vnucot


I'm using ZedBoard to test DDS core in our FPGA design. After add hw configs for the FPGA design and config hw description in petalinux. I got the DDS core in device tree as below:

amba_pl: amba_pl {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
ranges ;
axi_ad9122: axi_ad9122@74200000 {
compatible = "xlnx,axi-ad9122-1.0";
reg = <0x74200000 0x10000>;


So I tried to test reading and writing the DDS core by writing my own simple driver base on DDS core driver.

static const struct of_device_id axidds_of_match[] = {

    { .compatible = "xlnx,axi-ad9122-1.0", },



MODULE_DEVICE_TABLE(of, axidds_of_match);



static int axidds_probe(struct platform_device *pdev){

    struct cf_axi_dds_state *st;

    struct resource *mem;


    const struct of_device_id *id;



    id = of_match_device(axidds_of_match, &pdev->dev);

    if (!id)

        return -ENODEV;


    st = id->data;



      mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);


    st->regs = devm_ioremap_resource(&pdev->dev, mem);

    if (IS_ERR(st->regs)){

        return PTR_ERR(st->regs);


    return 0;



In my probe function, I do not do anything but map io resource for the DDS core. But when I tried to read and write the DDS core by using DDS read and write function:


static inline void dds_write(struct cf_axi_dds_state *st,

                 unsigned reg, unsigned val)


    iowrite32(val, st->regs + reg);



static inline unsigned int dds_read(struct cf_axi_dds_state *st, unsigned reg)


    return ioread32(st->regs + reg);



but the execution got hang and did not return anything. I think i did something wrong but cannot figure out the problem.

Could someone give any suggestion for this issue.

Thank you all in advance.