Page 1 of 1

Interrupt Timing

Posted: Tue Jun 18, 2019 2:24 pm
by zenzizen
Hi all,
I've just started diving into this woolly world of pi assembler, though my first language 20 years ago was Z80-assembler - so I'm not totally new to the concepts.
I've been looking at what Dhole did here https://dhole.github.io/post/gameboy_cartridge_emu_1/ emulating a gameboy cartridge using an stm32f4 discovery board and wanted to basically do the same thing for another console (potentially the GameGear among others) on the Pi CM3, not because it's useful, but because it's neat :)
A couple Italian students did some bare metal interrupt timing tests on the Pi 3 here: https://github.com/enricorov/Pinterrupt and I've pared their example down a bit on the CM IO Board, including removing the timer interrupt (which I don't think is actually needed), eliminating some reads from write-only registers, etc. and got similar, if slightly improved, results to theirs: ~1.75uS between input pin state change and output pin state change.
My question is: why is this so bad/slow compared to the stm32f4 example? I don't have one to play around with but my only guess was io bus speed, but I'm a little fuzzy as to what that actually means when it comes to interrupts. I'm fine doing more legwork to fix the slowness but I'm unsure what the data is pointing me to next (or rather, I'm unaware of what my next steps ought to be.) What accounts for the significant difference in speed between the two boards?