SAM4SD32 (SAM4S-EK2)
Loading...
Searching...
No Matches
cycle_counter.c
Go to the documentation of this file.
1
33/*
34 * Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
35 */
36
37#include "cycle_counter.h"
38
39// Delay loop is put to SRAM so that FWS will not affect delay time
40OPTIMIZE_HIGH
41RAMFUNC
42void portable_delay_cycles(unsigned long n)
43{
44 UNUSED(n);
45
46 __asm (
47 "loop: DMB \n"
48 "SUBS R0, R0, #1 \n"
49 "BNE.N loop "
50 );
51}
OPTIMIZE_HIGH RAMFUNC void portable_delay_cycles(unsigned long n)
Delay loop to delay n number of cycles.
ARM functions for busy-wait delay loops.