cancel
Showing results for 
Search instead for 
Did you mean: 

WIU problem uing 1.9 (ALL LINES)

lucapodesta
Associate II
Posted on October 24, 2009 at 06:29

WIU problem uing 1.9 (ALL LINES)

2 REPLIES 2
lucapodesta
Associate II
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

lucapodesta
Associate II
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