nucleo F767 PWM

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
mpython
Posts: 11
Joined: Sat Nov 14, 2020 7:32 pm

nucleo F767 PWM

Post by mpython » Mon Jul 18, 2022 12:30 pm

Hello,
I use Nuclo F767 with micropython.
I need to set PWM in multiple timers, unfortunately, I noticed, that two different timers aren't synchronized.
Any help? And I also need to do PWM like in the picture below. and therefore I need some offset....
pwm.png
pwm.png (52.92 KiB) Viewed 1971 times
Thank you for any advice.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: nucleo F767 PWM

Post by jimmo » Tue Jul 19, 2022 1:44 am

mpython wrote:
Mon Jul 18, 2022 12:30 pm
I need to set PWM in multiple timers, unfortunately, I noticed, that two different timers aren't synchronized.
Unfortunately you will need to configure the Timer peripheral directly via the registers.

This can be done with machine.mem32 and the register base and offsets in the stm module.

Here is an example: viewtopic.php?f=3&t=4847&p=27905#p27912

mpython
Posts: 11
Joined: Sat Nov 14, 2020 7:32 pm

Re: nucleo F767 PWM

Post by mpython » Wed Jul 20, 2022 9:41 pm

Thank you for your help. I am still not sure how to implement timer offset. Do you have some example?
I didn't find help for stm library.

KurtHarders
Posts: 1
Joined: Thu Jul 28, 2022 11:15 am

Re: nucleo F767 PWM

Post by KurtHarders » Thu Jul 28, 2022 4:10 pm

Hello,
what is the timing of the PWM-signals? ms or µs? Is it possible to have one timer task firing single pulse timers with the needed signals?

If timing is really tight, a RP2040 might help with its PIO statemachine.
Regards, Kurt

mpython
Posts: 11
Joined: Sat Nov 14, 2020 7:32 pm

Re: nucleo F767 PWM

Post by mpython » Fri Jul 29, 2022 7:47 am

Hello, the timing is µs. I am not sure about firing single pulse timers.

Post Reply