1. I have made a SYSTICK interrupt in TM4c123GH6PM. CPU speed is at 80Mhz. Code is below. In systick interrupt a led is toggled. Code is build with full speed optimization. CRO probe is at 10x & peak detect setting is done in CRO.
2. I have started by Systick period value 8000000 i.e 100ms, pulse ON CRO is exact, then I keep on decrease the period by decade factor.
8000000 i.e 100ms works fine, (visible led blinking here)
800000 i.e 10ms works fine, (visible led ON from here, led turn/off fast so cannot observe off)
80000 i.e 1ms works fine,
8000 i.e 100us works fine,
800 i.e 10us works fine.
80 i.e 1us works fine.
8 i.e 100ns. (Here pulse on or off time recorded is 200ns around instead of 100ns)
1 i.e 12.5ns. (Again 200ns time of pulse on or off)
3. I think what's happening here, before control gets out of ISR, another interrupt happens. So waht happens, let say control takes lots of time in ISR & in meantime systick timer rolls off 10 times. So will interrupt will again execute 10 times after that or only once?
4. Why even at 12.5ns of systick time, toggle taking 200ns. I think there are 16 number of cycles for PUSH so that when isr happens & control actually goes into interrupt. It makes 16*12.5 = 200ns. But then there is also POP involved & ISR instruction execution. How to explain this delay
2. I have started by Systick period value 8000000 i.e 100ms, pulse ON CRO is exact, then I keep on decrease the period by decade factor.
8000000 i.e 100ms works fine, (visible led blinking here)
800000 i.e 10ms works fine, (visible led ON from here, led turn/off fast so cannot observe off)
80000 i.e 1ms works fine,
8000 i.e 100us works fine,
800 i.e 10us works fine.
80 i.e 1us works fine.
8 i.e 100ns. (Here pulse on or off time recorded is 200ns around instead of 100ns)
1 i.e 12.5ns. (Again 200ns time of pulse on or off)
3. I think what's happening here, before control gets out of ISR, another interrupt happens. So waht happens, let say control takes lots of time in ISR & in meantime systick timer rolls off 10 times. So will interrupt will again execute 10 times after that or only once?
4. Why even at 12.5ns of systick time, toggle taking 200ns. I think there are 16 number of cycles for PUSH so that when isr happens & control actually goes into interrupt. It makes 16*12.5 = 200ns. But then there is also POP involved & ISR instruction execution. How to explain this delay
Code:
void systic_isr_handler(void)
{
RED_LED_INVERT();
}
void all_tasks_manager(void)
{
/* clear any previous interrupt */
SysTickDisable();
SysTickIntDisable();
/* resgister the int */
SysTickIntRegister(systic_isr_handler);
SysTickIntEnable();
SysTickPeriodSet(2U);
SysTickEnable();
while(1);
}