Other Parts Discussed in Thread: CC3200, CC3220SF
Hi,
i am using UtilsDelay from utils.c in the SDK driverlib for microsecond delay.
Assembly code used for UtilsDelay(unsigned long ulCount)
// For CCS implement this function in pure assembly. This prevents the TI
// compiler from doing funny things with the optimizer.
//
#if defined(ccs)
__asm(" .sect \".text:UtilsDelay\"\n"
" .clink\n"
" .thumbfunc UtilsDelay\n"
" .thumb\n"
" .global UtilsDelay\n"
"UtilsDelay:\n"
" subs r0, #1\n"
" bne.n UtilsDelay\n"
" bx lr\n");
#endif
As per documentation UtilsDelay(unsigned long ulCount) funtion takes 3 clock cycle to execute.
in CC3200 below calculations for 10 us delay getting 20 us delay which is 2X times greater then expected
ulCount = 10 * 80/3
Expected: 10 us delay
output: 20 us delay
in CC3220SF below calculations for 10 us delay getting 40 us delay which is 4X times greater then expected
ulCount = 10 * 80/3
Expected: 10 us delay
output: 40 us delay
My questions:
1. Why i am seeing 2X times greater delay in CC3200 and 4x times greater delay in CC3220SF
Thanks,
Cornelius S