MCPWM understanding

lharms
Posts: 2
Joined: Fri Sep 25, 2020 10:23 am

MCPWM understanding

Postby lharms » Fri Sep 25, 2020 10:28 am

Hello everyone,
i am new to this forum and to the esp-idf. I am trying to understand the MCPWM basic config example.
The capturing with the demo is working on my ESP Board, but i can't find out how to set the APB clock speed.

And this leeds me to question what the magic behind this formula is:
current_cap_value[0] = (current_cap_value[0] / 10000) * (10000000000 / rtc_clk_apb_freq_get());

What i want to do is printing the values in ns and also capture signals which might be in 100ns distance.

Can someone give me a hint, where to search ? Might also be, that the problem is sitting in front of the PC. ;-)

best regards
Lars

lharms
Posts: 2
Joined: Fri Sep 25, 2020 10:23 am

Re: MCPWM understanding

Postby lharms » Mon Sep 28, 2020 5:07 pm

Short update: Meanwhile i figured out that the module is running at 80MHz.
But what i cannot find in the docs, what is the highest frequency to capture ? Actually the shortest time, which is displayed is around 1375us. I would expect much higher values, when running at 80MHz.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: MCPWM understanding

Postby WiFive » Mon Sep 28, 2020 8:24 pm

Apb clock is basically fixed to 80mhz. In the example the prescaler is set to 0 so each tick is 12.5ns.

Who is online

Users browsing this forum: No registered users and 67 guests