1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Debugging by bsing SW interrupts instead of HW interrupts

Discussion in 'Embedded' started by istakoz2000, Aug 18, 2005.

  1. istakoz2000

    istakoz2000 Guest

    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?
     
    istakoz2000, Aug 18, 2005
    #1
    1. Advertisements

  2. istakoz2000

    Paul Burke Guest

    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
     
    Paul Burke, Aug 18, 2005
    #2
    1. Advertisements

  3. istakoz2000

    AlfieNoakes Guest

    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.
     
    AlfieNoakes, Aug 18, 2005
    #3
  4. istakoz2000

    istakoz2000 Guest

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

    Husnu Ayduk

    yazdi:
     
    istakoz2000, Aug 19, 2005
    #4
  5. 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
     
    Steve at fivetrees, Aug 19, 2005
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.