stm32 pwm signal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-03 1:51 AM
Hi guys,
I would like to know how can I read PWM (duty cycle) generated from stm32?
And how I can read Pwm generated from 1 stm32 send to another stm32?
Sorry my bad english
Ty
- Labels:
-
TIM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-03 6:04 AM
Essentially the same question as this one, which @Imen DAHMEN​ has already answered.
Regards
/Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-03 6:25 AM
You can look at the registers PSC, ARR and CCR1 to determine the frequency and duty cycle being generated.
You can use an Input Capture mode to measure period and duty, basically allowing one edge to clear the timer count, and latch the prior value, and other edge to latch the count relative to the starting point.
Basically a TIM and two channels, from one pin, for each PWM signal you want to measure.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-03 9:19 AM
You can get an examples if install Stm32CubeMX. Somethings like TIM_PWMInput - depends on a board/ uCPU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-03 9:31 AM
Ok ty all but I don't understand how I can send Pwm signal to another stm32?
I need to link the PWM pin (from the first STM32) to what pin of the other stm32?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-03 9:52 AM
Pin number depends on a model. What kind of board do you have?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-03 10:16 AM
I have NUCLEO-H7A3ZI-Q
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-03 10:31 AM
Unfortunately, there is no such example for H7A3ZI. But you can study a code for H743ZI,
I'm not sure if pins match between this two uCPU. I'd recommend to download Stm32CubeMX and generate C code for H7A3ZI yourself
