1352 views|7 replies

968

Posts

0

Resources
The OP
 

When a port bit is set to falling edge trigger, and its interrupt enable bit is not set, the interrupt flag is triggered when a falling edge occurs. [Copy link]

邀请:@maychang   @jimtien   @freebsder   @lugl4313820   参与回复

The problem is twofold:

Set a port bit to falling edge trigger

1. When its interrupt enable bit is 0, will the interrupt flag be set when a falling edge occurs ?

2. When the interrupt enable bit is 0, the falling edge of the port bit will set the corresponding interrupt flag bit to 1. Then when the interrupt enable bit is set to 1, will the program automatically enter the interrupt handler immediately ?

This post is from stm32/stm8

Latest reply

Anyone who has done query mode programming knows it.   Details Published on 2022-9-21 20:53
 

2w

Posts

0

Resources
2
 

"When the interrupt enable bit is 0, the falling edge of the port bit sets the corresponding interrupt flag bit to 1. Then, when the interrupt enable bit is set to 1, will the program automatically enter the interrupt handler immediately?"

Yes. But it also depends on whether the interrupt master control bit is turned on and whether there are other high-priority or same-level interrupts being executed.

This post is from stm32/stm8
 
 

6062

Posts

4

Resources
3
 

Interrupt enable is a channel that controls whether the channel to the interrupt is opened. The interrupt flag is equivalent to an event. If the channel is opened, the event can pass. If the channel is not opened, it is blocked here. However, the event still occurs. It just fails to pass and generates an interrupt.

This post is from stm32/stm8
 
 

5998

Posts

6

Resources
4
 

This is like a one-way road, with many checkpoints. You have to wait.

This post is from stm32/stm8
 
 
 

3

Posts

0

Resources
5
 

There will be a flag bit if there is a falling edge;

With a flag bit and interrupt entry enabled, you can enter the interrupt program

This post is from stm32/stm8
 
 
 

104

Posts

0

Resources
6
 

Why do you still ask questions when you can know the answer by just trying it yourself? Oh! That’s not how learning works!

This post is from stm32/stm8
 
 
 

7422

Posts

2

Resources
7
 
This post was last edited by freebsder on 2022-9-21 20:22

1. Yes.

2. Yes.

If I remember correctly, the ARM version is like this, where interrupt loss is prevented. For example, when the RTOS enters the critical section and turns off interrupts for synchronization, an interrupt is generated. The interrupt is immediately restored after leaving the critical section, so that it is not lost. Otherwise, the critical section logic will change.

This post is from stm32/stm8
 
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 

143

Posts

1

Resources
8
 

Anyone who has done query mode programming knows it.

This post is from stm32/stm8
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list