Test environment: stm32f407 168mhz,iar 7.4, optimized level low
Test method: The first signal is the output of the Tim comparator and produces a comparator interrupt. The first sentence in the Interrupt service program immediately pulls up a gpio, and the oscilloscope checks the latency of the two signals to understand the interrupt response speed in general.
Interrupt vector table in Flash, interrupt service program in Flash, delay about 155ns:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/70/54/wKiom1W2RAmidz7fAAzmX5RhciM966.jpg "style=" float: none; "title=" 8dd618ec2a836b0b9610ef6799fa3837.jpg "alt=" Wkiom1w2ramidz7faazmx5rhcim966.jpg "/>
Interrupt vector table in internal RAM, interrupt service program in Flash, less about 20NS
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/70/51/wKioL1W2ReuwD0zcAA583OBtJgc324.jpg "style=" float: none; "title=" 1abdb59447d400929d992ca7bab3a62d.jpg "alt=" Wkiol1w2reuwd0zcaa583obtjgc324.jpg "/>
Interrupt vector table in internal RAM, interrupt service program in internal RAM, does not look much different:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/70/51/wKioL1W2RgDCZLIbAA3ZiuCvwGs714.jpg "style=" float: none; "title=" 40f62a73fd5cc3ed8162f76c555d8ac8.jpg "alt=" Wkiol1w2rgdczlibaa3ziucvwgs714.jpg "/>
Note: This test method interrupts the response delay is not accurate, because the Gpio pull high at least two instructions, plus bus access delay and GPIO output delay. But you can still get the results you want: how long it takes for the interrupt to take effect.
This article is from the "Skywolf blog" blog, make sure to keep this source http://iskywolf.blog.51cto.com/5231583/1678930
Test the effect of STM32F4 interrupt vector table moving to internal RAM on interrupt response speed