About Timer Counter

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

cross mob
Translation_Bot
Community Manager
Community Manager
Community Manager

I have tried to get a count using psoc63-ble but it does not work.
When I tried to take counts at 10MHz I could only take counts in the lower frequency range.
I would like to know what is the maximum count that CAN be taken and how to write the code if I want to take a count at a higher value such as 10 MHz or higher.

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/PSoC-6/About-Timer-Counter/td-p/490191

0 Likes
4 Replies
Translation_Bot
Community Manager
Community Manager
Community Manager

Hi @wata san,

Thank you for using Infineon Community.

Could you please let us know which kind of Timer Counter is used in your case, TCPWM or else?

Best Regards, Ryan

0 Likes
Translation_Bot
Community Manager
Community Manager
Community Manager

I want to use a 10MHz clock from Timer/Counter.
Specifically, I want to output two pwm's with phase shifted when outputting, so I want to output waveforms with phase shifted by using Timer/Counter to output waveforms at arbitrary timing.

0 Likes
Translation_Bot
Community Manager
Community Manager
Community Manager

@wata san

Have you checked the input clock(clock source) of the TCPWM?

If the input clock(clock source) of TCPWM is too slow, it cannot output higher frequency clock.

To get a 10MHz output, I think it is better to use >=20MHz input clock for the TCPWM block.

If it was me, I will use 100MHz input for TCPWM, then set PERIOD count as 10 (its register should be set as 9 in default align mode), and COMPARE value as 5; so I CAN get 10MHz output with 50% duty cycle.

Please be sure the input clock frequency is correct.

Best Regards, Ryan

0 Likes
Translation_Bot
Community Manager
Community Manager
Community Manager

Thank you for your reply.
I do not want to output 10MHz pwm.
I want to take a count using a 10MHz clock, and when the count reaches an arbitrary number (in this case, after 60ns), I want to perform the next process, but I CAN only perform interrupt processing every 5ns or so after the count is taken. I would like to know how to solve this.
The reference is Timer(Timer/Counter) of Hardware Abstraction Layer(HAL) of infineon
https://infineon.github.io/psoc6hal/html/group__group__hal__timer.html
I would like to take a count and do the next process with reference to
Thank you in advance for your help.

0 Likes