From: Goran_Bilski on
On Nov 27, 6:24 pm, bish <bishes...(a)gmail.com> wrote:
> On Nov 27, 10:08 pm, bish <bishes...(a)gmail.com> wrote:
>
>
>
>
>
> > On Nov 27, 6:14 am, Bryan <bryan.fletc...(a)avnet.com> wrote:
>
> > > Not sure what the problem is with your code.  Here's an example with
> > > one timer.  It's 10.1, but there weren't any changes in the interrupt
> > > stuff between 9.2 and 10.1 (so I'm told).  This is based on a lab from
> > > one of Avnet's Speedway trainings.  I ran it on the Xilinx Spartan-3A
> > > DSP 1800A Starter and verified that the interrupts are indeed
> > > happening.  There is a bit file in the project directory if you don't
> > > want to rebuild the project.
>
> > > Bryan
>
> > > The following file has been made available for you to download from
> > > Avnet's File Transfer web site:http://xfer.avnet.com/uploads/Xil3S1800ADSP_Interrupt_v10.1.03.zip
>
> > I downloaded the timer_interrupt.bit file into FPGA using impact, the
> > timer example worked FINE.
> > It generated the required output and interrrupt was working. BUT
>
> > I could not use the system.xmp present inhttp://xfer.avnet.com/uploads/Xil3S1800ADSP_Interrupt_v10.1.03.zip
> > because
> > I have edk 9.2i, but it was developed with later version of edk.
>
> > And here is the mysterious problem yet to be solved!!
> > So I developed a base system and used xps interrupt controller and
> > timer. The MHS file is:
>
> > #
> > ###########################################################################­­###
> > # Created by Base System Builder Wizard for Xilinx EDK 9.2 Build
> > EDK_Jm.16
> > # Sun Nov 16 21:24:15 2008
> > # Target Board:  Xilinx Spartan-3A DSP 1800A Starter Board Rev 1
> > # Family:        spartan3adsp
> > # Device:        xc3sd1800a
> > # Package:       fg676
> > # Speed Grade:   -4
> > # Processor: microblaze_0
> > # System clock frequency: 62.000000 MHz
> > # On Chip Memory :   8 KB
> > #
> > ###########################################################################­­###
> >  PARAMETER VERSION = 2.1.0
>
> >  PORT fpga_0_RS232_Uart_1_RX_pin = fpga_0_RS232_Uart_1_RX, DIR = I
> >  PORT fpga_0_RS232_Uart_1_TX_pin = fpga_0_RS232_Uart_1_TX, DIR = O
> >  PORT sys_clk_pin = dcm_clk_s, DIR = I, SIGIS = CLK, CLK_FREQ =
> > 125000000
> >  PORT sys_rst_pin = sys_rst_s, DIR = I, RST_POLARITY = 0, SIGIS = RST
> >  PORT dip_GPIO_in_pin = dip_GPIO_in, DIR = I, VEC = [0:7]
> >  PORT push_GPIO_in_pin = push_GPIO_in, DIR = I, VEC = [0:3]
> >  PORT led_GPIO_IO_pin = led_GPIO_IO, DIR = IO, VEC = [0:7]
>
> > BEGIN microblaze
> >  PARAMETER HW_VER = 7.00.a
> >  PARAMETER INSTANCE = microblaze_0
> >  PARAMETER C_INTERCONNECT = 1
> >  PARAMETER C_DEBUG_ENABLED = 1
> >  PARAMETER C_AREA_OPTIMIZED = 1
> >  BUS_INTERFACE DLMB = dlmb
> >  BUS_INTERFACE ILMB = ilmb
> >  BUS_INTERFACE DPLB = mb_plb
> >  BUS_INTERFACE IPLB = mb_plb
> >  BUS_INTERFACE DEBUG = microblaze_0_dbg
> >  PORT RESET = mb_reset
> >  PORT INTERRUPT = Interrupt
> > END
>
> > BEGIN plb_v46
> >  PARAMETER INSTANCE = mb_plb
> >  PARAMETER HW_VER = 1.00.a
> >  PORT PLB_Clk = sys_clk_s
> >  PORT SYS_Rst = sys_bus_reset
> > END
>
> > BEGIN lmb_v10
> >  PARAMETER INSTANCE = ilmb
> >  PARAMETER HW_VER = 1.00.a
> >  PORT LMB_Clk = sys_clk_s
> >  PORT SYS_Rst = sys_bus_reset
> > END
>
> > BEGIN lmb_v10
> >  PARAMETER INSTANCE = dlmb
> >  PARAMETER HW_VER = 1.00.a
> >  PORT LMB_Clk = sys_clk_s
> >  PORT SYS_Rst = sys_bus_reset
> > END
>
> > BEGIN lmb_bram_if_cntlr
> >  PARAMETER INSTANCE = dlmb_cntlr
> >  PARAMETER HW_VER = 2.10.a
> >  PARAMETER C_BASEADDR = 0x00000000
> >  PARAMETER C_HIGHADDR = 0x00003fff
> >  BUS_INTERFACE SLMB = dlmb
> >  BUS_INTERFACE BRAM_PORT = dlmb_port
> > END
>
> > BEGIN lmb_bram_if_cntlr
> >  PARAMETER INSTANCE = ilmb_cntlr
> >  PARAMETER HW_VER = 2.10.a
> >  PARAMETER C_BASEADDR = 0x00000000
> >  PARAMETER C_HIGHADDR = 0x00003fff
> >  BUS_INTERFACE SLMB = ilmb
> >  BUS_INTERFACE BRAM_PORT = ilmb_port
> > END
>
> > BEGIN bram_block
> >  PARAMETER INSTANCE = lmb_bram
> >  PARAMETER HW_VER = 1.00.a
> >  BUS_INTERFACE PORTA = ilmb_port
> >  BUS_INTERFACE PORTB = dlmb_port
> > END
>
> > BEGIN xps_uartlite
> >  PARAMETER INSTANCE = RS232_Uart_1
> >  PARAMETER HW_VER = 1.00.a
> >  PARAMETER C_BAUDRATE = 115200
> >  PARAMETER C_ODD_PARITY = 0
> >  PARAMETER C_USE_PARITY = 0
> >  PARAMETER C_SPLB_CLK_FREQ_HZ = 62500000
> >  PARAMETER C_BASEADDR = 0x84000000
> >  PARAMETER C_HIGHADDR = 0x8400ffff
> >  BUS_INTERFACE SPLB = mb_plb
> >  PORT RX = fpga_0_RS232_Uart_1_RX
> >  PORT TX = fpga_0_RS232_Uart_1_TX
> > END
>
> > BEGIN clock_generator
> >  PARAMETER INSTANCE = clock_generator_0
> >  PARAMETER HW_VER = 1.00.a
> >  PARAMETER C_EXT_RESET_HIGH = 1
> >  PARAMETER C_CLKIN_FREQ = 125000000
> >  PARAMETER C_CLKOUT0_FREQ = 62500000
> >  PARAMETER C_CLKOUT0_PHASE = 0
> >  PARAMETER C_CLKOUT0_GROUP = NONE
> >  PORT CLKOUT0 = sys_clk_s
> >  PORT CLKIN = dcm_clk_s
> >  PORT LOCKED = Dcm_all_locked
> >  PORT RST = net_gnd
> > END
>
> > BEGIN mdm
> >  PARAMETER INSTANCE = debug_module
> >  PARAMETER HW_VER = 1.00.a
> >  PARAMETER C_MB_DBG_PORTS = 1
> >  PARAMETER C_USE_UART = 1
> >  PARAMETER C_UART_WIDTH = 8
> >  PARAMETER C_BASEADDR = 0x84400000
> >  PARAMETER C_HIGHADDR = 0x8440ffff
> >  BUS_INTERFACE SPLB = mb_plb
> >  BUS_INTERFACE MBDEBUG_0 = microblaze_0_dbg
> >  PORT Debug_SYS_Rst = Debug_SYS_Rst
> > END
>
> > BEGIN proc_sys_reset
> >  PARAMETER INSTANCE = proc_sys_reset_0
> >  PARAMETER HW_VER = 2.00.a
> >  PARAMETER C_EXT_RESET_HIGH = 0
> >  PORT Slowest_sync_clk = sys_clk_s
> >  PORT Dcm_locked = Dcm_all_locked
> >  PORT Ext_Reset_In = sys_rst_s
> >  PORT MB_Reset = mb_reset
> >  PORT Bus_Struct_Reset = sys_bus_reset
> >  PORT MB_Debug_Sys_Rst = Debug_SYS_Rst
> > END
>
> > BEGIN xps_gpio
> >  PARAMETER INSTANCE = push
> >  PARAMETER HW_VER = 1.00.a
> >  PARAMETER C_GPIO_WIDTH = 4
> >  PARAMETER C_ALL_INPUTS = 1
> >  PARAMETER C_IS_BIDIR = 0
> >  PARAMETER C_BASEADDR = 0x8141c200
> >  PARAMETER C_HIGHADDR = 0x8141c3ff
> >  BUS_INTERFACE SPLB = mb_plb
> >  PORT GPIO_in = push_GPIO_in
> > END
>
> > BEGIN xps_gpio
> >  PARAMETER INSTANCE = dip
> >  PARAMETER HW_VER = 1.00.a
> >  PARAMETER C_GPIO_WIDTH = 8
> >  PARAMETER C_ALL_INPUTS = 1
> >  PARAMETER C_IS_BIDIR = 0
> >  PARAMETER C_BASEADDR = 0x81420000
> >  PARAMETER C_HIGHADDR = 0x8142ffff
> >  BUS_INTERFACE SPLB = mb_plb
> >  PORT GPIO_in = dip_GPIO_in
> > END
>
> > BEGIN xps_gpio
> >  PARAMETER INSTANCE = led
> >  PARAMETER HW_VER = 1.00.a
> >  PARAMETER C_GPIO_WIDTH = 8
> >  PARAMETER C_IS_BIDIR = 0
> >  PARAMETER C_BASEADDR = 0x81400000
> >  PARAMETER C_HIGHADDR = 0x8140ffff
> >  BUS_INTERFACE SPLB = mb_plb
> >  PORT GPIO_IO = led_GPIO_IO
> > END
>
> > BEGIN xps_timer
> >  PARAMETER INSTANCE = xps_timer_0
> >  PARAMETER HW_VER = 1.00.a
> >  PARAMETER C_BASEADDR = 0x81418000
> >  PARAMETER C_HIGHADDR = 0x814181ff
> >  PARAMETER C_ONE_TIMER_ONLY = 1
> >  BUS_INTERFACE SPLB = mb_plb
> >  PORT Interrupt = xps_timer_0_Interrupt
> > END
>
> > BEGIN xps_intc
> >  PARAMETER INSTANCE = xps_intc_0
> >  PARAMETER HW_VER = 1.00.a
> >  PARAMETER C_BASEADDR = 0x81414000
> >  PARAMETER C_HIGHADDR = 0x814141ff
> >  BUS_INTERFACE SPLB = mb_plb
> >  PORT Irq = Interrupt
> >  PORT Intr = xps_timer_0_Interrupt
> > END
>
> > In xps_intc I have connected only timer interrupt to its Intr pin and
> > other interrupts like
> > from push buttons and other are NOT CONNECTED.
>
> In the configure ip.. option for xps interrupt controller I could not
> change the no. of interrupt inputs (by default it is 2), as it is set
> to 2 and disabled.
> So I used two timers and connected interrupt pins of these timers to
> interrupt controller just make intr inputs 2. Then again I checked
> with the "timer.c" file from the link, and still the same result:
> Timer example failed !!!
>
> This has already taken so many days and problem is becoming more
> mysterious (but frustrating)!!!
>
>
>
> > Then I used "timer.c" provided in the link (I have not used external
> > DDR2 SDRAM), and the result:
>
> > Starting Timer example
> > Timer example FAILED
>
> > So, I am really confused here!!
>
> > > Click on the hyperlink or enter this URL into your web browser to
> > > retrieve the file.
> > > This file will remain on the server for approximately 5 days from the
> > > date of the upload at which time it will be deleted.  Please be sure
> > > to download it before the expiration time.
> > > This file will expire on Dec  1, 2008.
>
> > > File Size: 232357 Bytes
>
> > > On Nov 26, 12:22 am, bish <bishes...(a)gmail.com> wrote:
>
> > > > On Nov 26, 4:58 am, David <simianfe...(a)gmail.com> wrote:
>
> > > > > On Nov 26, 2:37 am, bish <bishes...(a)gmail.com> wrote:
>
> > > > > > On Nov 25, 12:25 pm, Matthias Alles <REMOVEallesCAPIT...(a)NOeit.SPAMuni-
>
> > > > > > kl.de> wrote:
> > > > > > > Hi!
>
> > > > > > > I wonder, whether "one_second_flag" is declared as volatile? If not, the
> > > > > > > compiler optimizes your if-statement in the while(1) loop away. You can
> > > > > > > check this by using mb-objdump.
>
> > > > > > I tried using the volatile for one_second_flag, still it does not
> > > > > > work. It just prints "the value of count = 1" once in terminal and
> > > > > > nothing happens then.
>
> > > > > > > Cheers,
> > > > > > > Matthias
>
> > > > > > > bish schrieb:
>
> > > > > > > > I am trying to use a timer for regular interrupt in microblaze. I am
> > > > > > > > using edk 9.2i and spartan 3a dsp 1800a.
> > > > > > > > Even following a simple lab example widely used by beginners didn't
> > > > > > > > work:http://users.utcluj.ro/~baruch/ssce/labor/EDK-L5-e.pdf
>
> > > > > > > > I have connected all the interrupt ports correctly as evident from the
> > > > > > > > following portion of the mhs file:
> > > > > > > > BEGIN microblaze
> > > > > > > >  PARAMETER HW_VER = 7.00.a
> > > > > > > > ...........
> > > > > > > > ...........
> > > > > > > > PORT INTERRUPT = interrupt
> > > > > > > > END
>
> > > > > > > > BEGIN xps_timer
> > > > > > > >  PARAMETER INSTANCE = delay
> > > > > > > >  PARAMETER HW_VER = 1.00.a
> > > > > > > >  PARAMETER C_ONE_TIMER_ONLY = 1
> > > > > > > >  PARAMETER C_BASEADDR = 0x8141c200
> > > > > > > >  PARAMETER C_HIGHADDR = 0x8141c3ff
> > > > > > > >  BUS_INTERFACE SPLB = mb_plb
> > > > > > > >  PORT Interrupt = timer1
> > > > > > > >  PORT CaptureTrig0 = net_gnd
> > > > > > > > END
>
> > > > > > > > BEGIN xps_intc
> > > > > > > >  PARAMETER INSTANCE = xps_intc_0
>
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

Hi,

What compilator options do you use when compiling timer.c?
Can you email me the .elf file?

Göran
From: bish on
On Nov 28, 2:01 pm, Goran_Bilski <goran.bil...(a)xilinx.com> wrote:
> On Nov 27, 6:24 pm, bish <bishes...(a)gmail.com> wrote:
>
> > On Nov 27, 10:08 pm, bish <bishes...(a)gmail.com> wrote:
>
> > > On Nov 27, 6:14 am, Bryan <bryan.fletc...(a)avnet.com> wrote:
>
> > > > Not sure what the problem is with your code.  Here's an example with
> > > > one timer.  It's 10.1, but there weren't any changes in the interrupt
> > > > stuff between 9.2 and 10.1 (so I'm told).  This is based on a lab from
> > > > one of Avnet's Speedway trainings.  I ran it on the Xilinx Spartan-3A
> > > > DSP 1800A Starter and verified that the interrupts are indeed
> > > > happening.  There is a bit file in the project directory if you don't
> > > > want to rebuild the project.
>
> > > > Bryan
>
> > > > The following file has been made available for you to download from
> > > > Avnet's File Transfer web site:http://xfer.avnet.com/uploads/Xil3S1800ADSP_Interrupt_v10.1.03.zip
>
> > > I downloaded the timer_interrupt.bit file into FPGA using impact, the
> > > timer example worked FINE.
> > > It generated the required output and interrrupt was working. BUT
>
> > > I could not use the system.xmp present inhttp://xfer.avnet.com/uploads/Xil3S1800ADSP_Interrupt_v10.1.03.zip
> > > because
> > > I have edk 9.2i, but it was developed with later version of edk.
>
> > > And here is the mysterious problem yet to be solved!!
> > > So I developed a base system and used xps interrupt controller and
> > > timer. The MHS file is:
>
> > > #
> > > ###########################################################################­­­###
> > > # Created by Base System Builder Wizard for Xilinx EDK 9.2 Build
> > > EDK_Jm.16
> > > # Sun Nov 16 21:24:15 2008
> > > # Target Board:  Xilinx Spartan-3A DSP 1800A Starter Board Rev 1
> > > # Family:        spartan3adsp
> > > # Device:        xc3sd1800a
> > > # Package:       fg676
> > > # Speed Grade:   -4
> > > # Processor: microblaze_0
> > > # System clock frequency: 62.000000 MHz
> > > # On Chip Memory :   8 KB
> > > #
> > > ###########################################################################­­­###
> > >  PARAMETER VERSION = 2.1.0
>
> > >  PORT fpga_0_RS232_Uart_1_RX_pin = fpga_0_RS232_Uart_1_RX, DIR = I
> > >  PORT fpga_0_RS232_Uart_1_TX_pin = fpga_0_RS232_Uart_1_TX, DIR = O
> > >  PORT sys_clk_pin = dcm_clk_s, DIR = I, SIGIS = CLK, CLK_FREQ =
> > > 125000000
> > >  PORT sys_rst_pin = sys_rst_s, DIR = I, RST_POLARITY = 0, SIGIS = RST
> > >  PORT dip_GPIO_in_pin = dip_GPIO_in, DIR = I, VEC = [0:7]
> > >  PORT push_GPIO_in_pin = push_GPIO_in, DIR = I, VEC = [0:3]
> > >  PORT led_GPIO_IO_pin = led_GPIO_IO, DIR = IO, VEC = [0:7]
>
> > > BEGIN microblaze
> > >  PARAMETER HW_VER = 7.00.a
> > >  PARAMETER INSTANCE = microblaze_0
> > >  PARAMETER C_INTERCONNECT = 1
> > >  PARAMETER C_DEBUG_ENABLED = 1
> > >  PARAMETER C_AREA_OPTIMIZED = 1
> > >  BUS_INTERFACE DLMB = dlmb
> > >  BUS_INTERFACE ILMB = ilmb
> > >  BUS_INTERFACE DPLB = mb_plb
> > >  BUS_INTERFACE IPLB = mb_plb
> > >  BUS_INTERFACE DEBUG = microblaze_0_dbg
> > >  PORT RESET = mb_reset
> > >  PORT INTERRUPT = Interrupt
> > > END
>
> > > BEGIN plb_v46
> > >  PARAMETER INSTANCE = mb_plb
> > >  PARAMETER HW_VER = 1.00.a
> > >  PORT PLB_Clk = sys_clk_s
> > >  PORT SYS_Rst = sys_bus_reset
> > > END
>
> > > BEGIN lmb_v10
> > >  PARAMETER INSTANCE = ilmb
> > >  PARAMETER HW_VER = 1.00.a
> > >  PORT LMB_Clk = sys_clk_s
> > >  PORT SYS_Rst = sys_bus_reset
> > > END
>
> > > BEGIN lmb_v10
> > >  PARAMETER INSTANCE = dlmb
> > >  PARAMETER HW_VER = 1.00.a
> > >  PORT LMB_Clk = sys_clk_s
> > >  PORT SYS_Rst = sys_bus_reset
> > > END
>
> > > BEGIN lmb_bram_if_cntlr
> > >  PARAMETER INSTANCE = dlmb_cntlr
> > >  PARAMETER HW_VER = 2.10.a
> > >  PARAMETER C_BASEADDR = 0x00000000
> > >  PARAMETER C_HIGHADDR = 0x00003fff
> > >  BUS_INTERFACE SLMB = dlmb
> > >  BUS_INTERFACE BRAM_PORT = dlmb_port
> > > END
>
> > > BEGIN lmb_bram_if_cntlr
> > >  PARAMETER INSTANCE = ilmb_cntlr
> > >  PARAMETER HW_VER = 2.10.a
> > >  PARAMETER C_BASEADDR = 0x00000000
> > >  PARAMETER C_HIGHADDR = 0x00003fff
> > >  BUS_INTERFACE SLMB = ilmb
> > >  BUS_INTERFACE BRAM_PORT = ilmb_port
> > > END
>
> > > BEGIN bram_block
> > >  PARAMETER INSTANCE = lmb_bram
> > >  PARAMETER HW_VER = 1.00.a
> > >  BUS_INTERFACE PORTA = ilmb_port
> > >  BUS_INTERFACE PORTB = dlmb_port
> > > END
>
> > > BEGIN xps_uartlite
> > >  PARAMETER INSTANCE = RS232_Uart_1
> > >  PARAMETER HW_VER = 1.00.a
> > >  PARAMETER C_BAUDRATE = 115200
> > >  PARAMETER C_ODD_PARITY = 0
> > >  PARAMETER C_USE_PARITY = 0
> > >  PARAMETER C_SPLB_CLK_FREQ_HZ = 62500000
> > >  PARAMETER C_BASEADDR = 0x84000000
> > >  PARAMETER C_HIGHADDR = 0x8400ffff
> > >  BUS_INTERFACE SPLB = mb_plb
> > >  PORT RX = fpga_0_RS232_Uart_1_RX
> > >  PORT TX = fpga_0_RS232_Uart_1_TX
> > > END
>
> > > BEGIN clock_generator
> > >  PARAMETER INSTANCE = clock_generator_0
> > >  PARAMETER HW_VER = 1.00.a
> > >  PARAMETER C_EXT_RESET_HIGH = 1
> > >  PARAMETER C_CLKIN_FREQ = 125000000
> > >  PARAMETER C_CLKOUT0_FREQ = 62500000
> > >  PARAMETER C_CLKOUT0_PHASE = 0
> > >  PARAMETER C_CLKOUT0_GROUP = NONE
> > >  PORT CLKOUT0 = sys_clk_s
> > >  PORT CLKIN = dcm_clk_s
> > >  PORT LOCKED = Dcm_all_locked
> > >  PORT RST = net_gnd
> > > END
>
> > > BEGIN mdm
> > >  PARAMETER INSTANCE = debug_module
> > >  PARAMETER HW_VER = 1.00.a
> > >  PARAMETER C_MB_DBG_PORTS = 1
> > >  PARAMETER C_USE_UART = 1
> > >  PARAMETER C_UART_WIDTH = 8
> > >  PARAMETER C_BASEADDR = 0x84400000
> > >  PARAMETER C_HIGHADDR = 0x8440ffff
> > >  BUS_INTERFACE SPLB = mb_plb
> > >  BUS_INTERFACE MBDEBUG_0 = microblaze_0_dbg
> > >  PORT Debug_SYS_Rst = Debug_SYS_Rst
> > > END
>
> > > BEGIN proc_sys_reset
> > >  PARAMETER INSTANCE = proc_sys_reset_0
> > >  PARAMETER HW_VER = 2.00.a
> > >  PARAMETER C_EXT_RESET_HIGH = 0
> > >  PORT Slowest_sync_clk = sys_clk_s
> > >  PORT Dcm_locked = Dcm_all_locked
> > >  PORT Ext_Reset_In = sys_rst_s
> > >  PORT MB_Reset = mb_reset
> > >  PORT Bus_Struct_Reset = sys_bus_reset
> > >  PORT MB_Debug_Sys_Rst = Debug_SYS_Rst
> > > END
>
> > > BEGIN xps_gpio
> > >  PARAMETER INSTANCE = push
> > >  PARAMETER HW_VER = 1.00.a
> > >  PARAMETER C_GPIO_WIDTH = 4
> > >  PARAMETER C_ALL_INPUTS = 1
> > >  PARAMETER C_IS_BIDIR = 0
> > >  PARAMETER C_BASEADDR = 0x8141c200
> > >  PARAMETER C_HIGHADDR = 0x8141c3ff
> > >  BUS_INTERFACE SPLB = mb_plb
> > >  PORT GPIO_in = push_GPIO_in
> > > END
>
> > > BEGIN xps_gpio
> > >  PARAMETER INSTANCE = dip
> > >  PARAMETER HW_VER = 1.00.a
> > >  PARAMETER C_GPIO_WIDTH = 8
> > >  PARAMETER C_ALL_INPUTS = 1
> > >  PARAMETER C_IS_BIDIR = 0
> > >  PARAMETER C_BASEADDR = 0x81420000
> > >  PARAMETER C_HIGHADDR = 0x8142ffff
> > >  BUS_INTERFACE SPLB = mb_plb
> > >  PORT GPIO_in = dip_GPIO_in
> > > END
>
> > > BEGIN xps_gpio
> > >  PARAMETER INSTANCE = led
> > >  PARAMETER HW_VER = 1.00.a
> > >  PARAMETER C_GPIO_WIDTH = 8
> > >  PARAMETER C_IS_BIDIR = 0
> > >  PARAMETER C_BASEADDR = 0x81400000
> > >  PARAMETER C_HIGHADDR = 0x8140ffff
> > >  BUS_INTERFACE SPLB = mb_plb
> > >  PORT GPIO_IO = led_GPIO_IO
> > > END
>
> > > BEGIN xps_timer
> > >  PARAMETER INSTANCE = xps_timer_0
> > >  PARAMETER HW_VER = 1.00.a
> > >  PARAMETER C_BASEADDR = 0x81418000
> > >  PARAMETER C_HIGHADDR = 0x814181ff
> > >  PARAMETER C_ONE_TIMER_ONLY = 1
> > >  BUS_INTERFACE SPLB = mb_plb
> > >  PORT Interrupt = xps_timer_0_Interrupt
> > > END
>
> > > BEGIN xps_intc
> > >  PARAMETER INSTANCE = xps_intc_0
> > >  PARAMETER HW_VER = 1.00.a
> > >  PARAMETER C_BASEADDR = 0x81414000
> > >  PARAMETER C_HIGHADDR = 0x814141ff
> > >  BUS_INTERFACE SPLB = mb_plb
> > >  PORT Irq = Interrupt
> > >  PORT Intr = xps_timer_0_Interrupt
> > > END
>
> > > In xps_intc I have connected only timer interrupt to its Intr pin and
> > > other interrupts like
> > > from push buttons and other are NOT CONNECTED.
>
> > In the configure ip.. option for xps interrupt controller I could not
> > change the no. of interrupt inputs (by default it is 2), as it is set
> > to 2 and disabled.
> > So I used two timers and connected interrupt pins of these timers to
> > interrupt controller just make intr inputs 2. Then again I checked
> > with the "timer.c" file from the link, and still the same result:
> > Timer example failed !!!
>
> > This has already taken so many days and problem is becoming more
> > mysterious (but frustrating)!!!
>
> > > Then I used "timer.c" provided in the link (I have not used external
> > > DDR2 SDRAM), and the result:
>
> > > Starting Timer example
> > > Timer example FAILED
>
> > > So, I am really confused here!!
>
> > > > Click on the hyperlink or enter this URL into your web browser to
> > > > retrieve the file.
> > > > This file will remain on the server for approximately 5 days from the
> > > > date of the upload at which time it will be deleted.  Please be sure
> > > > to download it before the expiration time.
> > > > This file will expire on Dec  1, 2008.
>
> > > > File Size: 232357 Bytes
>
> > > > On Nov 26, 12:22 am, bish <bishes...(a)gmail.com> wrote:
>
> > > > > On Nov 26, 4:58 am, David <simianfe...(a)gmail.com> wrote:
>
> > > > > > On Nov 26, 2:37 am, bish <bishes...(a)gmail.com> wrote:
>
> > > > > > > On Nov 25, 12:25 pm, Matthias Alles <REMOVEallesCAPIT...(a)NOeit.SPAMuni-
>
> > > > > > > kl.de> wrote:
> > > > > > > > Hi!
>
> > > > > > > > I wonder, whether "one_second_flag" is declared as volatile? If not, the
> > > > > > > > compiler optimizes your if-statement in the while(1) loop away. You can
> > > > > > > > check this by using mb-objdump.
>
> > > > > > > I tried using the volatile for one_second_flag, still it does not
> > > > > > > work. It just prints "the value of count = 1" once in terminal and
> > > > > > > nothing happens then.
>
> > > > > > > > Cheers,
> > > > > > > > Matthias
>
> > > > > > > > bish schrieb:
>
> > > > > > > > > I am trying to use a timer for regular interrupt in microblaze. I am
> > > > > > > > > using edk 9.2i and spartan 3a dsp 1800a.
> > > > > > > > > Even following a simple lab example widely used by beginners didn't
> > > > > > > > > work:http://users.utcluj.ro/~baruch/ssce/labor/EDK-L5-e.pdf
>
> > > > > > > > > I have connected all the interrupt ports correctly as evident from the
> > > > > > > > > following portion of the mhs file:
> > > > > > > > > BEGIN microblaze
> > > > > > > > >  PARAMETER HW_VER = 7.00.a
> > > > > > > > > ...........
> > > > > > > > > ...........
> > > > > > > > > PORT INTERRUPT = interrupt
> > > > > > > > > END
>
> > > > > > > > > BEGIN xps_timer
> > > > > > > > >  PARAMETER INSTANCE = delay
> > > > > > > > >  PARAMETER HW_VER = 1.00.a
> > > > > > > > >  PARAMETER C_ONE_TIMER_ONLY = 1
> > > > > > > > >  PARAMETER C_BASEADDR = 0x8141c200
> > > > > > > > >  PARAMETER C_HIGHADDR = 0x8141c3ff
> > > > > > > > >  BUS_INTERFACE SPLB = mb_plb
> > > > > > > > >  PORT Interrupt = timer1
> > > > > > > > >  PORT CaptureTrig0 = net_gnd
> > > > > > > > > END
>
> > > > > > > > > BEGIN xps_intc
> > > > > > > > >  PARAMETER INSTANCE = xps_intc_0
>
> > ...
>
> > read more »- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
>
> Hi,
>
> What compilator options do you use when compiling timer.c?

mb-gcc

The compiler option for "debug and optimization" is:
Debug level: Generate Debug symbols(-g)
Optimization Level: No Optimization(-00)



> Can you email me the .elf file?

I have emailed you with the elf file.
>
> Göran

From: SUMAN on
I too had same problem with edk/ise 9.2i. There might be certain bugs
in the initial release. After installing service packs (ise sp4, edk
sp2), the problem is solved.