Topic : SW1 on Reva 2.1 used as an interrupt generator with ST7Flite39

Forum : ST7/STM8

Original Post
Post Information Post
November 23, 2010 - 6:59pm
Guest

Hi, I'm using a ST7FLITE39 and Ride7

with:

ei3 interrupt wrote:

void irqSShandler(void) interrupt 3
{
// Place your interrupt handler code here
IO_Write( IO_PORT_A, IO_PIN_0, IO_DATA_TOGGLE);

}

and

periphinit wrote:

void PeriphInit ( void ) {

/* Interrupt controller initialization */
ITC_Init();
ITC_ConfigureInterrupt(IT_PortB, 0, 3);

/* I/O Port initialization */
IO_Init();
IO_Output(IO_PUSH_PULL, IO_PORT_A, 0x9f);
IO_Output(IO_PUSH_PULL, IO_PORT_B, 0x4);
IO_Input(IO_PULL_UP, IO_PORT_B, 0x2);
IO_Input(IO_PULL_UP_IT, IO_PORT_B, 0x9);

EnableInterrupts;


}/* end of PeriphInit */

When I switch the MicroSW on PB0 (on the REva 2.10), I want to see D0 blinking.

I think I don't understand interrupt pin usage... Ride7 lose connection with the RLink... it seems to be that code block it...

Replies
Post Information Post
+1
0
-1
November 24, 2010 - 10:30am
Guest

It's a sleep solved problem ;)

The ei3 on PB0 is referred to interrupt 4 not interrupt 3!!!

Solved.

+1
0
-1
November 26, 2010 - 9:32am
Raisonance Support Team

Great news!

I knew that Gremlins were doing strange things when eating after mindight, but I did not know that they were able to solve ST7 problems while sleeping ;-)

Best Regards,

+1
0
-1
November 26, 2010 - 6:38pm
Guest

Bruno wrote:
Great news!

I knew that Gremlins were doing strange things when eating after mindight, but I did not know that they were able to solve ST7 problems while sleeping ;-)

Best Regards,

Ahahah XD

I was only very tired.

PS the SW on Reva board is a bad interrupt generator... when switched it could create multiple interrupt at once...
Try to use a external generator connected directly to the Reva SW Jumpers instead.

Bye