Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

TCPWM Counter Does Not Start in Traveo II Family – KBA229680

TCPWM Counter Does Not Start in Traveo II Family – KBA229680

ChaitanyaV_61
Employee
Employee
50 questions asked 25 likes received 25 sign-ins

Author: ShusakuS_56           Version: **

 

Question:

Why doesn't the counter start when I enable the counter in TCPWM?

 

Answer:

If the counter does not start, make sure that the following are set correctly:

(1) CLK Setting

(2) Hardware control signals

 

(1) CLK Setting

TCPWM has a system clock and a counter clock.

The system clock is supplied from CLK_PERI via a divider. This clock is used for trigger synchronization.

The counter clock is supplied from CLK_PERI via Peripheral Clock Dividers. This clock is used for counter control. You should set the clock for each counter.

 

pastedImage_0.png

 

The number of these clocks differs for the CYT2B/CYT4B/CYT4D series. For more details, see the "Clock Diagram" section in the corresponding datasheet.

 

(2) Hardware control signals

Even if the counter is enabled, the counter does not start unless the counter's hardware control signals (Reload, Start, Stop, Count, Capture0, Capture1) are enabled. The counter's hardware control signals must be selected from the following Trigger Input signal using the “TCPWMx_GRPy_CNTz_TR_IN_SEL0” and “TCPWMx_GRPy_CNTz_TR_IN_SEL1” register.

- Fixed at ‘0’ or ‘1’

- Connect signals from the output of other peripherals or external terminals via the Trigger Multiplexer block.

[Example]

In timer mode, hardware control signals are used as follows:

- Reload         : Active "H". Initializes and starts the counter.

When "H" is supplied, the counter starts from the initial value (Up mode: 0, Down mode: period).

If neither Reload nor Start is supplied, the counter will not start.

- Start             : Active "H". Starts the counter.

When "H" is supplied, the counter starts from the current counter value.

If neither Reload nor Start is supplied, the counter will not start.

- Stop             : Active "H". Stops the counter.

When "H" is supplied, the counter does not start.

- Count          : Active "H". Count event increments/decrements the counter.

When "L" is supplied, the counter does not start.

- Capture0     : Not used.

- Capture1     : Not used.

These signals can also be generated by with the TCPWMx_GRPy_CNTz_TR_CMD register.

For more details, see the "Timer, Counter, and PWM" section in the corresponding Technical Reference Manual.

 

Note: This KBA applies to the following series of Traveo II MCUs:

  • CYT2B Series
  • CYT4B Series
  • CYT4D Series

 

TCPWM Interrupt Does Not Occur in Traveo II Fam... | Cypress Developer Community

0 Likes
489 Views