SoftPwmSTM32 [Libray]

What are you developing?
dannyf
Posts: 447
Joined: Sat Jul 04, 2020 7:46 pm

Re: SoftPwmSTM32 [Libray]

Post by dannyf »

all the pwm generation and associated management is done in the timer ISR. you can simply think of this as a hardware pwm.
dannyf
Posts: 447
Joined: Sat Jul 04, 2020 7:46 pm

Re: SoftPwmSTM32 [Libray]

Post by dannyf »

with that said, I think you will find it much easier to simply code a slave stm32f103 as a pwm generator taking command from the master.
dannyf
Posts: 447
Joined: Sat Jul 04, 2020 7:46 pm

Re: SoftPwmSTM32 [Libray]

Post by dannyf »

but hopefully this will get you started.
Lou79
Posts: 3
Joined: Mon Sep 04, 2023 4:10 pm

Re: SoftPwmSTM32 [Libray]

Post by Lou79 »

Thank you, dannyf. And very well explained. I really appreciate your help and I'm sure others will find this useful too.

It would be funny if I end up with a slave STM32F1 just for the extra hardware PWM channels, as this one is already one of 16 identical slaves to a master controller STM32F1. Analog poly synth project...
dannyf
Posts: 447
Joined: Sat Jul 04, 2020 7:46 pm

Re: SoftPwmSTM32 [Libray]

Post by dannyf »

sounds like you are on a good path - you already have the code for the slave :)

I wonder if there are dedicated pwm chips that you can use for something like this. if not, a mcu-based solution isn't bad.
dannyf
Posts: 447
Joined: Sat Jul 04, 2020 7:46 pm

Re: SoftPwmSTM32 [Libray]

Post by dannyf »

I wonder if there are dedicated pwm chips that you can use for something like this.
wonder no more - the first return from google suggests LT8500: 48-channels, 12-bit resolution, spi interface, ...
dannyf
Posts: 447
Joined: Sat Jul 04, 2020 7:46 pm

Re: SoftPwmSTM32 [Libray]

Post by dannyf »

stm makes a led1642 - 16 channel pwm generator. probably a mcu in its heart.

TI has an almost identical part as well. in tssop packaging so more user friendly.
Post Reply

Return to “Projects”