cancel
Showing results for 
Search instead for 
Did you mean: 

STM8S interrupts

carnett1
Associate II
Posted on August 08, 2012 at 17:37

Can someone direct me, a newbe to hardwire interrupts, to a pdf file telling me how to use an interrupt on the stm8s207? I want to run the stm8s continuously and retrieve information by command from and master controller.

charles arnett
1 REPLY 1
thibaut2
Associate II
Posted on August 14, 2012 at 11:59

It depends on which peripheral you use to communicate between your slave and master.

1) enable the corresponding interrupt (cf usermanual or reference manual of your chip)

2) write in file stm8s_it.c your interrupt subroutine

 (don't forget to clear appropriated flag)

you shall find this one in templates or example projects, it s fullfill with empty functions named :

 ''INTERRUPT_HANDLER(XXXXX_IRQHandler, Y) '' where XXXX is the name of port/peripheral calling the interrupt. You have to write your subroutine in the handler corresponding to the peripheral you re using.

Try to use the firmware library, it shall help 😉