Examples on System timer module for MPC5777C

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

Examples on System timer module for MPC5777C

2,106 Views
vrushalitaklika
Contributor III

Hi,

Is there any example or sample code on STM module for MPC5777C?

Please share

Thanks

Vrushali

5 Replies

1,453 Views
martin_kovar
NXP Employee
NXP Employee

Hello Martin,

I am afraid STM and PIT are only timers, which are usable for your purpose. If any of these ones are not fulfill your requirements, you can check Decrementer, which is part of the core, but I am afraid, this will not be enough for you. For more information please check e200z7 core reference manual.

Regards,

Martin

1,453 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

please check the example below. STM module used in MPC5777C is the same as in MPC5748G. Check function void STM0_ch0_init(uint32_t vSTM_CMP)

Example MPC5748G Standby mode GHS614 

If you have any other question, please feel free to write me back.

Regards,

Martin

1,453 Views
martinschulthei
Contributor III

Hi Martin,

regarding this question, I have another one on the same topic:

RM of MPC5777C states that STM Ch1-3 share the same interrupt source (201). Is there an efficient way to handle/dispatch this interrupt. From my point of view, the only possible way is to read the interrupt flag from each channel one after another.

Is this correct or is there another possibility ?

Thanks and Best Regards,

Martin

0 Kudos

1,453 Views
martin_kovar
NXP Employee
NXP Employee

Hello Martin,

yes, unfortunately, this is only possibility.

Regards,

Martin

1,453 Views
martinschulthei
Contributor III

Hi Martin,

many thanks for your fast response.

Unfortunately for our multicore OS this solution is not appropriate.

Can you suggest another timer module which can be used as free running timer ?

In detail we only need a free running up counter, which triggers an interrupt if an compare value is reached (same as STM).

We need a high resolution time base for e.g. task scheduling.

There are several other timer modules on the MPC577xC but I'm only familiar with the PIT module which does not fulfill the HRT requirements.

Thanks a lot and best regards

Martin

0 Kudos