Skip to main content
Visitor II
October 24, 2009
Question

WIU problem uing 1.9 (ALL LINES)

  • October 24, 2009
  • 2 replies
  • 675 views
Posted on October 24, 2009 at 06:29

WIU problem uing 1.9 (ALL LINES)

    This topic has been closed for replies.

    2 replies

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:59

    Hi,

    I have two interrupts on the same WIU group, on P6.0 and on P6.2

    I understood only one line in a group can generate an Interrupt.

    So I decided to use the WIU_IRQHandler to manage the second interrupt in the same group.

    I know from the manual any line ORed can generate an irq to vic1.9 and also a wakeup signal.

    Just I need manage interrupt vic1.9, ie the WIU_IRQ.

    But it doesn't work.

    So I used an other interrupt line to check a solution.

    WIU_StructInit(&WIU_InitStructure);

    WIU_InitStructure.WIU_Line = WIU_Line11;

    WIU_Init(&WIU_InitStructure);

    SCU_WakeUpLineConfig(11);

    Using a line on other group I obtained the second interrupt as well.

    BUT if I comment the source this way:

    // SCU_WakeUpLineConfig(11);

    I espect to receive the WIU_IRQ, but It doesn't.

    these are the configuration i used

    SCU_APBPeriphClockConfig(__WIU, ENABLE);

    SCU_AHBPeriphClockConfig(__VIC,ENABLE);

    SCU_AHBPeriphReset(__VIC,DISABLE);

    VIC_Config(WIU_ITLine,VIC_IRQ,3);

    VIC_ITCmd(WIU_ITLine,ENABLE);

    VIC_Config(EXTIT1_ITLine,VIC_IRQ,4);

    VIC_ITCmd(EXTIT1_ITLine,ENABLE);

    VIC_Config(EXTIT2_ITLine,VIC_IRQ,5);

    VIC_ITCmd(EXTIT2_ITLine,ENABLE);

    WIU_Cmd(ENABLE);

    WIU_ClearFlag(WIU_Line11);

    WIU_ClearFlag(WIU_Line18);

    ... never come in the WIU_ITLine.

    Thank you, for any suggestion

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:59

    I found the gap...

    I wrote a wrong sequene:

    ...

    WIU_Cmd(ENABLE);

    WIU_ClearITPendingBit(WIU_Line18);

    WIU_DeInit();

    ...

    and sobstitute with this

    ...

    WIU_DeInit(); // *** <= First of all!

    WIU_ClearITPendingBit(WIU_Line18);

    WIU_Cmd(ENABLE);

    ...

    Thanks