Page 2 of 2

Re: SoftPwmSTM32 [Libray]

Posted: Sat Sep 09, 2023 12:28 am
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.

Re: SoftPwmSTM32 [Libray]

Posted: Sat Sep 09, 2023 12:28 am
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.

Re: SoftPwmSTM32 [Libray]

Posted: Sat Sep 09, 2023 12:29 am
by dannyf
but hopefully this will get you started.

Re: SoftPwmSTM32 [Libray]

Posted: Sun Sep 10, 2023 12:02 am
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...

Re: SoftPwmSTM32 [Libray]

Posted: Sun Sep 10, 2023 2:56 pm
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.

Re: SoftPwmSTM32 [Libray]

Posted: Sun Sep 10, 2023 3:00 pm
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, ...

Re: SoftPwmSTM32 [Libray]

Posted: Sun Sep 10, 2023 3:13 pm
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.