Sign in

username:

password:



Not a member?

Search Comp.Arch.Embedded



Search tips

embedded by Keywords

68HC11 | 68HC12 | 8051 | 8052 | ARM | ARM7 | Asic | AT91 | AT91RM9200 | Atmel | AVR | AVRStudio | Bootloader | CFP | CompactFlash | Cygnal | Cypress | Dataflash | DSP | eCos | EEPROM | Embedded Linux | Emulator | Endian | Ethernet | Firewire | FPGA | Freescale | GCC | GNUARM | GSM | H8 | HDLC | I2C | Infineon | Interrupts | Java | JTAG | LCD | LED | LPC2000 | MCU | Microchip | MMC | MPLAB | MSP430 | PC104 | PCB | PCI | PCMCIA | PowerPC | Rabbit | RS232 | RS485 | RTOS | SBC | SDRAM | Sensor | SPI | STK500 | UART | UML | USART | USB | Verilog | VHDL | VxWorks | Xilinx


Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | Comp.Arch.Embedded | Debugging by bsing SW interrupts instead of HW interrupts

There are 5 messages in this thread.

You are currently looking at messages 0 to 5.

Debugging by bsing SW interrupts instead of HW interrupts - 2005-08-18 07:12:00

My problem is to test my driver software ,but the asic chip  is not
ready yet.I can simulate the registers of the asic easyly,but the
HW interrupts which will be generated by asic chip is necessary to
test my interrupt handler and interrupt driven SW.
For X86 processor I know that also SW interrupt generation is possible
but how?
How should I write interrupt handler for a SW interrupt?
Does anybody have an example or link about these?




Re: Debugging by bsing SW interrupts instead of HW interrupts - Paul Burke - 2005-08-18 08:07:00

i...@yahoo.com wrote:
> My problem is to test my driver software ,but the asic chip  is not
> ready yet.I can simulate the registers of the asic easyly,but the
> HW interrupts which will be generated by asic chip is necessary to
> test my interrupt handler and interrupt driven SW.

Just make a little interrupt generator, could be just a pushbutton, a 
Schmitt inverter, a resistor and a cap (depending on how your interrupts 
work), and tag that onto the appropriate interrupt signal. Push the 
button, and step your way through the bugs!

Paul Burke

Re: Debugging by bsing SW interrupts instead of HW interrupts - 2005-08-18 10:49:00

In X86 32-bit assembler, you can test your interrupt routine by:

  PUSHFD
  CALL    FAR isr_address

or

  PUSHFD
  PUSH    CS
  CALL    NEAR isr_address

But because your hardware isn't actually signalliung an interrupt,
register reads in the ISR may not give what you'd expect, so this will
really just check the prolog/epilog code of your IST handler.

It would be preferable to actually trigger the hardware interrupt
proper. If you need to pull a line up or down, just have a 10k resistor
running to Vcc or ground and touch it to the relevant line. Presuming
this is practicable of course.

S/W ints are no replacement for H/W ints, but are generally used to
supply a different functionality.

Regards,
Alfie.


Re: Debugging by bsing SW interrupts instead of HW interrupts - 2005-08-19 03:49:00

Externally triggering of interrupt pin  seems to be practical .
I will try.Thank you.

Husnu Ayduk

A...@blueyonder.co.uk yazdi:
> In X86 32-bit assembler, you can test your interrupt routine by:
>
>   PUSHFD
>   CALL    FAR isr_address
>
> or
>
>   PUSHFD
>   PUSH    CS
>   CALL    NEAR isr_address
>
> But because your hardware isn't actually signalliung an interrupt,
> register reads in the ISR may not give what you'd expect, so this will
> really just check the prolog/epilog code of your IST handler.
>
> It would be preferable to actually trigger the hardware interrupt
> proper. If you need to pull a line up or down, just have a 10k resistor
> running to Vcc or ground and touch it to the relevant line. Presuming
> this is practicable of course.
>
> S/W ints are no replacement for H/W ints, but are generally used to
> supply a different functionality.
> 
> Regards,
> Alfie.


Re: Debugging by bsing SW interrupts instead of HW interrupts - Steve at fivetrees - 2005-08-19 09:32:00

<i...@yahoo.com> wrote in message 
news:1...@g43g2000cwa.googlegroups.com...
> Externally triggering of interrupt pin  seems to be practical .
> I will try.Thank you.

Be a bit careful - using a switch or some other manual means will result in 
bounce, and you're likely to see multiple interrupts. You might consider 
using some external logic to ensure that your IRQ pin only sees a single 
transition. You could for instance use a 555 to generate a regular LF IRQ, 
and use a switch to enable/disable the 555. Just a thought.

Steve
http://www.fivetrees.com