Fx2lib
0.2
|
#include "fx2types.h"
Go to the source code of this file.
Functions for causing delays.
Definition in file delay.h.
#define NOP __asm nop __endasm |
See TRM 15-14,15-15 some registers (r/w) require syncdelay after
up to the programmer to determine which sync is needed. for standard 48mhz clock w/ 48mhz IFCONFIG 3 nops is sufficient.
slower clock and faster ifclock require more delay
min delay = roof ( 1.5 x (ifclock/clkout + 1) )
Minimum IFCLOCK is 5mhz but you have to use an external clock source to go below 30mhz
IFCLKSRC 1 = internal, 0=external 3048mhz 0 = 30mhz, 1 = 48mzh
Figure your own sync delay out if IFCLKSRC=0.
#define SYNCDELAY2 NOP; NOP |
#define SYNCDELAY3 NOP; NOP; NOP |
#define SYNCDELAY4 NOP; NOP; NOP; NOP |