Skip to main content
Explorer
May 27, 2024
Solved

STM32MP15x PWM with DMA

  • May 27, 2024
  • 2 replies
  • 1060 views

Hi,

I am using a STM32MP151AAA3 and i need to control an RGB LED via PWM control (something like the WS2812B). I was looking into the PWM driver options for Linux side control and can't find options for PWM control for specific buffer sizes or anything like that (only for fixed PWM outputs).

On the bare metal MCU's i can control this via PWM and DMA and send a specified data buffer. does anyone know if there is a similar option for a Linux controller PWM driver?

The other option is to control these LED's via the secondary M4 core but I rather not if possible.

Kind regards,

Richard

    This topic has been closed for replies.
    Best answer by RBerk.1

    Hi Olivier,

    Thank you for your reply.

    After some internet searches i read on a few places that buffer PWM writes are a real hassle or just won't work under Linux. Our solution also due to time constraints was to replace the WS2812B LED's with 'normal' RGB LED's with 3 pin control via an I2C IO extender.

    So not really an answer to this question but a fix around the problem.

    Richard

    2 replies

    Technical Moderator
    May 31, 2024

    Hi @RBerk.1 

     

    Please have a look to PWM overview - stm32mpu 

     

    Hope it help 

     

    Olivier 

    RBerk.1AuthorAnswer
    Explorer
    June 3, 2024

    Hi Olivier,

    Thank you for your reply.

    After some internet searches i read on a few places that buffer PWM writes are a real hassle or just won't work under Linux. Our solution also due to time constraints was to replace the WS2812B LED's with 'normal' RGB LED's with 3 pin control via an I2C IO extender.

    So not really an answer to this question but a fix around the problem.

    Richard