Friday 30 August 2019

STM32F4 Interrupt latency - how fast can it go

STM32F4 - Interrupt latency

Following on from the ESP32, (ESP32 Interrupt Latency) I had a STM32F401RE Neucleo board lying about.. this was the next test bed for how fast can an interrupt go; and how fast can it manupulate a GPIO. Using OpenSTM32 development package and in C (no assembler yet)

First try - Using an Interrupt

My first experiment was with INTERRUPT routines. This shows how long it takes for the STM32F4 to act on an ISR  - 3uSeconds from the trace.


The YELLOW trace is the GPIO line dropping, the CYAN trace is another pin being cleared within the ISR function. I have a target of 100nSec to reach; I think that target is a bit much for this CPU


How fast can it actually toggle?

One thing I didn't look at was how fast the pin can be toggled.


Hmm... ~300nSecond for one pulse- and that is a while(1) set clear set clear loop using register access.  If the chip cant toggle at a fast pace, I dont think I have any hope reading a GPIO in a busy-wait loop.

Conclusion

The STM32F4 CPU isnt quick enough to interface directly to an 8Mhz bus on the Amiga. 

NEXT

The BeagleBone PRU speed ... https://gruhouse.blogspot.com/2019/08/beaglebone-black-adventures-with-pru-of.html


No comments:

Post a Comment