I have a S32K148-Q176 evaluation board and I am trying to establish some timed tasks, which at the moment just twiddle GPIO lines. All four channels of the LPIT are being used and the desire is to run them at something like 1ms, 2ms, 5ms and 10ms.
The board has been programmed via OpenSDA and PEMicro and is running from flash in debug mode. However the minimum LPIT time seems to be around 40ms.
I am assuming this is because of how the application has been built or how it has been programmed.
I would like to understand why this is so slow and how I might go about doing things differently to achieve the desired speeds. Searching the community has not revealed anything and hence the question.
Hi @vmhb
According to the information you are providing us, the problem may be that the clock frequency is too small for the delays you are looking for.
As you can see in the following image taken from the Table 27-8. Peripheral clock summary of the RM, the maximum frequency of the LPIT depends of the BUS_CLK, so increasing the frequency of this it also increase the resolution of the LPIT.
Please refers Chapter 28 System Clock Generator (SCG) for more information of clock configuration.
B.R.
VaneB
The slow LPIT execution was tracked down to some UART output execution which was blocking the interrupt handler. Therefore the LPIT execution speed was being limited by the UART baud rate. Thank you to all who looked and posted a response.