IMX8QM Timer Problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX8QM Timer Problem

802 Views
waleedabbasi
Contributor I

Dear Community Members,

I hope you are all well.

  

We are facing some problems with timers for CortexM4 on IMX8QM. Details are as follows.

 

Scenario:

We are using LPIT and TPM timers, both in free-running mode. One Timer (TPM) is configured to trigger an interrupt at a fixed interval, which is handled by the RTOS. Other timer (LPIT) is used to take measurements. One before the configuration of the TPM and one after the completion of the TPM ISR.

 

The difference between the expected time and the actual measurement should be 3-4% due to ISR overhead, but with IMX8QM the difference is in the range of 10-15%.

 

Summary of configurations and steps verified so far:

  1. TCM of CM4_0 is being used, for code and data. So no external bus sharing is required as TPM and LPIT are also on the M4 Platform.
  2. I am using MCUXpresso SDK for the configuration of the clocks for timers as well as the CPU. CPU frequency returned by SCU firmware APIs is 264Mhz and for timers its 24Mhz. (Both are default configurations of firmware).
  3. Timers frequency is correct i.e 24Mhz. It is also measured via Oscilloscope and GPIOs
  4. No frequency scaling for CortexM cores on IMX8QM
  5. Wfi of CortexM4 is not affecting the test cases
  6. During the measurements, the debugger is not interfering with the target and the target is allowed to run freely till the end of a test case.

 

Questions:

Now the pending point is if the CPU is taking more time to execute the interrupt path. Our expectation with the difference in frequencies of CPU vs timers (264MHz vs 24Mhz) is that the tolerance levels we configured should be sufficient as tested with different derivatives of CortexM4 and with the same code base. So interrupt latencies are already considered for the tolerance levels.

 

Example Difference of measurements:

As a reference, I am attaching along the excel sheet containing the time difference with another CorteM4 derivative(CPU freq 80Mhz, Timer freq 48Mhz) and IMX8QM. The other derivative is also implementing LPIT timer which is present on IMX8QM.

 

Please let me know if some other information is required from my end.

 

Regards,

Waleed Abbasi

0 Kudos
1 Reply

692 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

Unfortunately, we could not provide the proper support until the whole documentation of the i.MX8QM is officially released. You could go with your sales, they could help you with your problem. I apologize for the inconvenience this may give you.

Best regards,

Diego.

0 Kudos