Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 01 Nov 2004 09:17 AM by  robinb@logicpd.com
LoLo API interrupt functions
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages
gianca
New Member
New Member
Posts:


--
20 Oct 2004 11:24 AM
    I'm testing the LogicLoader API and I don't understand how do interrupt functions work. I founded html documentation in the sample_zoom_app example, where I can found more?
    robinb@logicpd.com
    New Member
    New Member
    Posts:


    --
    20 Oct 2004 04:47 PM
    The interrupts use Lolo's interrupt handling mechanism.

    To use interrupts, you should create an interrupt handler:

    static int pcmcia_intr_handler(u_int intr, void *data, struct regs *regs){... intr_clear(IRQ_number);}

    Then register the handler to an IRQ_number:

    intr_register_handler(IRQ_number, pcmcia_intr_handler, NULL);

    Enable your interrupt:

    intr_enable(IRQ_number);

    Enable global interrupts:

    intr_set_mask(INTR_ENABLE);
    gianca
    New Member
    New Member
    Posts:


    --
    21 Oct 2004 10:56 AM
    Thank you robinb, it's very clear.
    I have tested it immediately.
    I supposed the IRQ_number is uP Interrupt Source, indeed timer1 interrupt (IRQ_number 0x3D) works well.
    I noted that if I use a wrong IRQ_number function intr_enable(IRQ_number) returns error printing:
    enable_interrupt unknown intr xxxxxxxx
    Only with the IRQ_number 0x26, 0x27, 0x30, 0x3D the function don't return error.
    How can I use other interrupt source?
    robinb@logicpd.com
    New Member
    New Member
    Posts:


    --
    01 Nov 2004 09:17 AM
    You raise a good point. Currently, Logicloader only supports enabling a small subset of possible interrupts. To use another interrupt source, you will need to write your own interrupt enabling routine. To write such a routine, you will need to read the processor's manual to determine what registers/bits need to be set to enable your interrupt and then set them in your code.
    You are not authorized to post a reply.