difference between FTM and PIT_LDVAL

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

difference between FTM and PIT_LDVAL

1,638 Views
mehdikarimibiuk
Contributor V

I am looking at PE timer components and need to know what is the difference between FTMx_CxV and PIT_LDVALx? I also see some of FTM are FTM_MOD, what is that? There also is LPTMR0_CMR, what is that? and last but not least, I see SYST_RVR, what is that?

Labels (1)
Tags (3)
1 Reply

865 Views
perlam_i_au
Senior Contributor I

Hello Mehdi:

Well, the FTMx_CnV is the register on the Flex Timer Module in which you can configure the Channel Value: Captured FTM counter value of the input modes OR the match value for the output modes. I used as example the reference manual K70P256M150SF3RM, please review 44.3.7 Channel (n) Value (FTMx_CV).

In the other hand PIT_LDVALn is the register on the Periodic Interrupt Timer which you can configure the Timer Start Value Bits, these bits set the timer start value. The timer will count down until it reaches 0, then it will generate an interrupt and load this register value again. Writing a new value to this register will not restart the timer, instead the value will be loaded once the timer expires. To abort the current cycle and start a timer period with the new value, the timer must be disabled and enabled again. In this case check 45.3.2 Timer Load Value Register (PIT_LDVALn) on the same reference manual.

As you can see these registers are used for very different configurations, even in different modules, each module has their own registers and features, please see definitions for each one in order to check the differences.

Chapter 44 FlexTimer (FTM)

The FlexTimer Module (FTM) is a two to eight channel timer which supports input

capture, output compare, and the generation of PWM signals to control electric motor and

power management applications. The FTM time reference is a 16-bit counter that can be

used as an unsigned or signed counter.

Chapter 45 Periodic Interrupt Timer (PIT)

The PIT timer module is an array of timers that can be used to raise interrupts and trigger

DMA channels.

Regard the other registers you asked you can review the specific definition for each one on the reference manual I used as example, please see list below:

  • FTM_MOD = 44.3.5 Modulo (FTMx_MOD)
  • LPTMR0_CMR = 46.3.3 Low Power Timer Compare Register (LPTMRx_CMR)

SYST_RVR should be a system register and if you want to know details of this kind of registers you must check on ARM documentation.

My advise if you are using PEx, is: define what you want to do, check on the reference manual what modules you need and in which modes/configuration, then go to CodeWarrior  create a project and on select Hardware perspective (Window-->Open perspective-->View) to select each module and start configuration.

Have a nice day,
Perla Moncada

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos