I need to pulse a GPIO very quickly. The operation is taking much much longer than I expected, so I put in reads to the timer as follows:
timBeg = *((uint32_t*)TIMER_CNT_0);
*((uint32_t*)GPIO_GPVAL) |= 0x00000020;
*((uint32_t*)GPIO_GPVAL) &= ~0x00000020;
timEnd = *((uint32_t*)TIMER_CNT_0);
I'm getting timer delta counts of about 23. Since the timer clock input on the C6418 is CPUCLK/8, this means these operations are taking 8*23 = 184 CPUCLK cycles!
This seems excessive. I've tried globally disabling interrupts prior to the code and the readings are similar. Any ideas on why this time is so long would be appreciated.
--Randy
PS: CPUCLK is 500 MHz in this system.