UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 59746

2013.4 - Zynq - XSDK - PS7 init breaks when setting the version to Release from Debug.

Description

ps7_ddr_ecc_init always returns PS7_POLL_FAILED_DMA when in 'release' mode but works without issue in debug mode.

Release mode has the optimization flag -Os while debug has the flag -O0

Solution

To resolve this issue, modiify the code in ps7_init.c:
 
Original:
void mask_write (unsigned long add , unsigned long  mask, unsigned long val ) {
        unsigned long *addr = (unsigned long*) add;
        *addr = ( val & mask ) | ( *addr & ~mask);
        //xil_printf("MaskWrite : 0x%x--> 0x%x \n \r" ,add, *addr);
}
 
int mask_poll(unsigned long add , unsigned long mask ) {
        unsigned long *addr = (unsigned long*) add;
        int i = 0;
        while (!(*addr & mask)) {
          if (i == PS7_MASK_POLL_TIME) {
            return -1;
          }
          i++;
        }
     return 1;  
        //xil_printf("MaskPoll : 0x%x --> 0x%x \n \r" , add, *addr);
}
 
Modified:
void mask_write (unsigned long add , unsigned long  mask, unsigned long val ) {
        volatile unsigned long *addr = (unsigned long*) add;
        *addr = ( val & mask ) | ( *addr & ~mask);
        //xil_printf("MaskWrite : 0x%x--> 0x%x \n \r" ,add, *addr);
}
 
int mask_poll(unsigned long add , unsigned long mask ) {
        volatile unsigned long *addr = (unsigned long*) add;
        int i = 0;
        while (!(*addr & mask)) {
          if (i == PS7_MASK_POLL_TIME) {
            return -1;
          }
          i++;
        }
     return 1;  
        //xil_printf("MaskPoll : 0x%x --> 0x%x \n \r" , add, *addr);
}
AR# 59746
Date Created 03/12/2014
Last Updated 09/17/2014
Status Active
Type General Article
Devices
  • SoC
  • Zynq-7000
Tools
  • Vivado Design Suite - 2013.4
IP
  • Processing System 7