Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7512

General • Re: RP2350B - IRQ latency

$
0
0
Also take in account that accessing system counters takes a few more cycles for each access because they are located on APB bus.
The APB bridge provides an interface between the high-speed main AHB5 interconnect and the lower-bandwidth
peripherals. Unlike the AHB5 fabric, which offers zero-wait-state accesses everywhere, APB accesses take a minimum
of three cycles for a read, and four cycles for a write
.
If you want to count more precisely, use Systick, DWT CYCCNT (cycle counter), or RISC-V platform timer (SIO), and always check the disassembly.
Not every instruction take just one cycle, a little less predictable with Cortex-M33 (pipelining, not necessarily external stalls), this is ARM stuff.

Better start the counter in free running, and take time snapshots at start and stop.
Can also use inline assembly for more predictable order.

Statistics: Posted by gmx — Tue Nov 04, 2025 1:02 am



Viewing all articles
Browse latest Browse all 7512

Trending Articles