yes, the application can create a pm lock, and acquire/release the lock when we start/stop the mcpwm timer.chenyananee wrote: ↑Sun Jun 19, 2022 9:35 ami have saw that the mcpwm module can't perceive the DFS.
i need to call the function of esp_pm_lock_acquire(ESP_PM_APB_FREQ_MAX) when i use the mcpwm module, and need to call the function of esp_pm_lock_release(ESP_PM_APB_FREQ_MAX) when i stop the pwm.
is it right?
MCPWM
-
- Posts: 290
- Joined: Wed Sep 05, 2018 6:23 am
Re: MCPWM
-
- Posts: 30
- Joined: Sun Mar 21, 2021 9:35 am
Re: MCPWM
another question about the capture, see the picture for more details.
1.
how can i fix this issue with picture 1
2.
and i don't know the means about the value 10000,10000000000, this is from the example code.
i want to calculate the frequence about the input signal. i need the max value of the timer count and the clock frequence.
1.
how can i fix this issue with picture 1
2.
and i don't know the means about the value 10000,10000000000, this is from the example code.
i want to calculate the frequence about the input signal. i need the max value of the timer count and the clock frequence.
- Attachments
-
- frq.png (27.88 KiB) Viewed 3238 times
-
- cap.png (42.37 KiB) Viewed 3238 times
-
- Posts: 30
- Joined: Sun Mar 21, 2021 9:35 am
Re: MCPWM
when i call the api(current_cap_val = mcpwm_capture_signal_get_value(MCPWM_UNIT_0, MCPWM_SELECT_CAP0);) from the capture interrupt function, thie issue will appear by high frequence.
-
- Posts: 30
- Joined: Sun Mar 21, 2021 9:35 am
Re: MCPWM
i have find the reason of the interrupt error.
and i don't call the api from the flash this issue can be fixed.such like this picture ...
just for the calculation of the frequency, the input signal is 1kHz but we can see the result is 875 form the terminal log. so there is something wrong with this formula.
and i don't call the api from the flash this issue can be fixed.such like this picture ...
just for the calculation of the frequency, the input signal is 1kHz but we can see the result is 875 form the terminal log. so there is something wrong with this formula.
- Attachments
-
- cap fix.png (38.89 KiB) Viewed 3198 times
-
- Posts: 30
- Joined: Sun Mar 21, 2021 9:35 am
-
- Posts: 30
- Joined: Sun Mar 21, 2021 9:35 am
Re: MCPWM
clock is the apb clock,and there is no prescale.
so the input frequency is apb_clk/Δ.
test is ok for 1k,500Hz and so on.
so the input frequency is apb_clk/Δ.
test is ok for 1k,500Hz and so on.
- Attachments
-
- frequency.png (26.44 KiB) Viewed 3178 times
Who is online
Users browsing this forum: Bing [Bot] and 49 guests