AnsweredAssumed Answered

ADV7511 ZedBoard design with MicroBlaze instead of ARM Cortex-A9

Question asked by blong on Feb 14, 2014
Latest reply on Feb 24, 2014 by DragosB

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

HAL_PlatformInit(XPAR_AXI_IIC_0_BASEADDR,

                  XPAR_SCUTIMER_DEVICE_ID,

                  XPAR_SCUGIC_SINGLE_DEVICE_ID,

                  XPAR_SCUTIMER_INTR);

with

HAL_PlatformInit(XPAR_AXI_IIC_0_BASEADDR,

                  XPAR_AXI_TIMER_0_BASEADDR,

                  XPAR_AXI_TIMER_0_INTERRUPT_MASK,

                  XPAR_AXI_INTC_0_BASEADDR);

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 DDR_BASEADDR XPAR_DDR_MEM_BASEADDR

#define UART_BASEADDR XPS_UART1_BASEADDR

with

#define DDR_BASEADDR XPAR_PS7_DDR_0_S_AXI_BASEADDR

#define UART_BASEADDR 0xE0001000

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

Outcomes