I have a strange problem with kea8.It
ICS_C2 = 0x20;
ICS_C1 = 0x04;
while ((ICS_S & ICS_S_LOCK_MASK) == 0);
SIM_CLKDIV = 0x01100000;
ICS_C2 = 0x00;
/*!Comment:Set the systick timer as 1ms.*/
SYST_RVR = 48000u;
/*!Comment:set systick source clock.*/
SYST_CSR |= (1 << 2);
/*!Comment:Enable systick.*/
SYST_CSR |= (1 << 0);
/*!Comment:Enable interrupt.*/
SYST_CSR |= (1 << 1);
void SysTick_Handler(void)
{
/*!Comment:Catch the first time entering interrupt.*/
GPIOA_PTOR |= (1 << 13u);
}
I want to fix the delay time of systick timer?I use other chip like kea64 FEE mode with systick timer will not have this problem,it delay 20~30ms,too.
I want to know the minimal time to initialize clock FEI and FEE mode(KEA8 KEA64) .
Hello Chari Zhou,
Let me know if I understand correctly, you're presenting a problem of a delay present in the systick that is not present if you use other timers like the LPIT but this only happens when you use the internal oscillator but with the external one doesn't happen in the KEA64, am I correct?
Does this also happen using the FEE mode in the KEA8 or only with the FEI?
Best Regards,
Alexis Andalon
Hello Alexis,
You understand correctly!But I only find this problem using KEA8 in FEI mode.I think FEE mode works correctly because I did not find the similar problem before.
Best Regards!
Hello Charl,
Can you let me know how are you measuring this time? And also, could you try enabling the PIT and the Systick at the same time and check if the same delay appears?
Best Regards,
Alexis Andalon
Hello Alexis,
Only the systick timer has this problem!
Best Regards!
Charl
Hello Charl,
I tried to replicate this in the TRK-KEA8 but I couldn't do it, in my test the signals are shifted by some microseconds, this is the signals that I capture and as you see there isn't any perceptive delay:
The delay is around 13 us between the two signals:
You can check my code below. This is using the S32 Design Studio IDE.
Best Regards,
Alexis Andalon
Hello Alexis,
1. Can you let me know how are you measuring this time?
I do this by measuring the GPIO.I set PTB4 at the end of initialize code and toggle PTB4 in the systick timer interrupt handle function.
2. And also, could you try enabling the PIT and the Systick at the same time and check if the same delay appears?
OK,I will try this on work day.
Best Regards!
Charl