ADV7511 ZedBoard design with MicroBlaze instead of ARM Cortex-A9

I've gotten the no-OS/ADV7511_ZedBoard demo running on the cf_adv7511_zed reference design from github.

I have built a MicroBlaze-based XPS system based on cf_adv7511_zed but I am having trouble getting the demo program running on the MicroBlaze. The XPS system adds a MicroBlaze subsystem with an axi_timer and axi_intc.

The program never seems to get past HAL_PlatformInit() in main.c.

Is there any reason why the MicroBlaze version of the ADV7511 Transmitter Library might not work the ZedBoard?

Would it be possible for ADI to share the source for some of the HAL initialization calls in the library?

Thanks for any help.

I made the following changes to the demo code to try to get it running on MicroBlaze on a ZedBoard:

1) Link with ADV7511_Library/MicroBlaze/lib/libHDMI_MicroBlazeLib.a instead of ZedBoard/libHDMI_ZedBoardLib.a.

2) Following the example in ADV7511_VC707, in main.c, replace










3)  Add the following code so that printf and xil_printf on the MicroBlaze use the PS7 UART (this is from Xilinx's web site)

#define PS7_UART_BASEADDR 0xE0001000

/* Write to memory location or register */

#define X_mWriteReg(BASE_ADDRESS, RegOffset, data) \

        *(unsigned int *)(BASE_ADDRESS + RegOffset) = ((unsigned int) data);

/* Read from memory location or register */

#define X_mReadReg(BASE_ADDRESS, RegOffset) \

        *(unsigned int *)(BASE_ADDRESS + RegOffset);

#define XUartChanged_IsTransmitFull(BaseAddress) \

        ((Xil_In32((BaseAddress) + 0x2C) & 0x10) == 0x10)


void XUartChanged_SendByte(u32 BaseAddress, u8 Data)


        // Wait until there is space in TX FIFO

        while (XUartChanged_IsTransmitFull(BaseAddress));

        // Write the byte into the TX FIFO

        X_mWriteReg(BaseAddress, 0x30, Data);



void outbyte(char c) {

XUartChanged_SendByte(PS7_UART_BASEADDR, c);


4) In cf_hdmi.h, replace





#define UART_BASEADDR 0xE0001000

5) Removed all the audio stuff for the time being.

  • 0
    •  Analog Employees 
    on Feb 14, 2014 12:17 PM


    At this moment, if you don't want to use our libraries as they are, you can download the ADV7511 HDMI Transmitter Library API Source Code from the ADV7511 product page: (This software is protected by copyright law and international treaties. As a condition to accessing or using the software you must agree to the terms of the associated software license agreement.)

    However, in this case, you will have to implement yourself the I2C communication functions.



  • Hi Dragos,

    Thanks for the pointer, I will take a look at the source release.

    I'm guessing the reason that the pre-compiled libHDMI_MicroBlazeLib.a doesn't work on a MicroBlaze-based ZedBoard is that the I2C stuff in libHDMI_MicroBlazeLib.a was written for the VC707/KC705 boards which have an I2C Bus Switch (TI PCA9548)  between the FPGA and the ADV7511 which must be configured over I2C to select the desired downstream I2C slave, whereas on the ZedBoard, the FPGA connects directly to the ADV7511.

    On my Microblaze-based ZedBoard system, HAL_PlatformInit() is stuck in an infinite loop in I2C_Init(), presumably trying to communicate with the non-existent I2C Bus Switch.

  • 0
    •  Analog Employees 
    on Feb 18, 2014 11:23 AM

    Yes, you are right - on the Microblaze boards, the I2C Bus Switch is also configured.



  • I took a look at the ADV7511 Transmitter Library source code, but as Dragos mentioned, there are a number of functions that must be written by the user in wrapper.c. These include not just the basic HAL_I2CRead/Write functions, but also a number of ATV_* functions (ATV_LookupValue8, ATC_I2CWriteTable, ...).

    What I did was extract the object files from libHDMI_MicroBlazeLib.a (mb-ar x libHDMI_MicroBlazeLib.a) (which already has code for all the ATV_* functions in atv_common.o) and replaced platform.o with another object file containing new versions of the following functions:

    HAL_I2CReadByte(), HAL_I2CReadBlock(),

    HAL_I2CWriteByte(), HAL_I2CWriteBlock()


    with dummy versions (empty wrappers) for the following functions:



    I also created my own HAL_Platform_Init() function for initializing the axi_iic and axi_timer drivers (Xiic, XTmrCtr).

    This way I was able to get the ADV7511 demo program running on MicroBlaze on a ZedBoard.

    I had an issue with Xilinx's Xiic_DynSend() function not seeming to work for multi-byte writes, so I just made HAL_I2CWriteBlock() write one byte at a time.

  • Hi Dragos,

    I ran into the same problem as blong using the Microblaze library on a custom board without the I2C switch, where execution gets stuck in HAL_PlatformInit() because the switch is not on the bus.  I took a look at the source code in the link you provided, but if the HAL_PlatformInit() function is the only place where the switch is communicated with in the Microblaze library (to turn on the ADV7511's channel), I'm hoping I can just rewrite that function and still be able to use the rest of the pre-compiled library.  However, the source for HAL_PlatformInit() doesn't seem to be available so I'm not sure what all is done in it (specifically, interrupt configuration).  Could you provide some insight on what needs to occur in this function?