Hi to all, I have a question: I'm using a LPIT for a timer and I used the SDK routine(S32 Design Studio for ARM Version 2.2. with micro S32K142)
When I clear the interrupt flag, the timer to do this instruction is very high (30us); I verify this duration using an output pin (See code below) so if I used a 100us timer, the microcontroller works 30% of the time to clear the interrupt flag.
static inline void LPIT_ClearInterruptFlagTimerChannels(LPIT_Type * const base,
uint32_t mask)
{
/* Write 1 to clear the interrupt flag. */
PINS_DRV_WritePin(PTC,9,1); // wood
base->MSR = mask;
PINS_DRV_WritePin(PTC,9,0); // wood
the instruction base->MSR = mask is convert in assembler code as:
284 base->MSR = mask;
00004464: ldr r4, [pc, #20] ; (0x447c <LPIT_DRV_ClearInterruptFlagTimerChannels+40>)
00004466: str r6, [r4, #12]
could you help me?
thanks