STM8L --- External interrupt

note 1: 

  Several interrupts can be pending at the same time. When an interrupt request is not serviced immediately, it is latched and then processed when its software priority combined with the hardware priority becomes the highest one.

 

note 2:

From reference manuals(RM0031)

如果有多个中断源映射为同一个中断,它们是逻辑或的关系。也就是说,如果有两个同个中断源的中断同时触发中断,可以在中断处理函数通过查询的方式判断哪个中断响应,哪个中断先响应。

外部中断输入脚如果设置为上拉输入,什么问题都没有。如果一个中断源只有一个外部输入脚,设置浮空输入也是没有问题;但是如果一个中断源有两个输入脚,这两个输入脚都要设置为上拉输入,否则其中一个不能响应中断。

note 3:

 当中断函数正在执行,此时又来一个本中断源的中断触发,这个触发中断会被屏蔽。

 

 note 4:

 STM8L需要手动清楚中断标志位,STM8S不用

 

 

原文地址:https://www.cnblogs.com/god-of-death/p/6052321.html