Skip to main content
TEl B
Associate II
Apr 17, 2025 12:58 PM UTC
Question

Drive WS2812 with Nucleo-G031K8 like i'm doing in the attachment

With evaluation board of STM32-P107 I have a working code for controlling led strip (or more via GPIO's of port B) of 60 leds. I am more concerned with initialization functions DMA_init, TIM2_init and the associated interrupts. In the NUCLEO-G031K8 you only have 5 channels and a timer clock frequency of 16Mhz. I want to control led strips with NUCLEO-G031K8 exactly in the same way as STM32-P107. Then the DMA's can do their job, and the controller can keep busy with other things.

Can somebody convert the code in the attachment to Nucleo-G031K8?

This topic has been closed for replies.

3 replies

Amel NASRI
ST Technical Moderator
Apr 22, 2025 9:24 AM UTC

Hi @TEl B ,

Welcome to ST Community!

STM32-P107 is not an ST board but it contains an STM32. So we cannot -at ST- do the reverse engineering of the example you need.

However, I suggest you start to build your own application based on STM32CubeMX by configuring the required GPIOs, DMA channels & Timers.

Try it this way and come back to the community in case you are blocked somewhere.

-amel

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
TEl B
TEl BAuthor
Associate II
Apr 24, 2025 9:30 AM UTC

Hi Amel,

I can not do everything with STM32CubeMX.

Would you like to check the ini and interrupt functions in the main.c file in of project in the attachment. I don't know what i'm doing wrong, i see no activity on the GPIO.

Best regards,

Taoufik

Pavel A.
Apr 24, 2025 1:02 PM UTC

Here you can get help with your project and 3rd party board .