I am trying to toggle a pin at a rate of 60 us. I know that Clock_tickPeriod is 10 us, so I want 6 ticks.
Clock setup:
/* SCIO clock */ Clock_Params scioClockParams; Clock_Params_init(&scioClockParams); scioClockParams.startFlag = TRUE; scioClockParams.period = 6; Clock_construct(&scioClock, scioSwiFxn, 0, &scioClockParams);
ISR:
static volatile int toggle = 0; static void scioSwiFxn(UArg unused) { toggle ^= 1; PIN_setOutputValue(ioPinHandle, Board_PIN_GPIO4, (uint32_t)toggle); }
I expect a 60 us square wave on this pin, but instead I get this. The small pulse is 9.2 us, the large pulse in the middle is 166 us.